Skip to content

Commit

Permalink
improved Mojo::Home portability
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 23, 2011
1 parent e8219fd commit 675152d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@
This file documents the revision history for Perl extension Mojolicious.

1.89 2011-08-23 00:00:00
- Improved Mojo::Home portability. (omega)
- Improved documentation.

1.88 2011-08-23 00:00:00
Expand Down
9 changes: 6 additions & 3 deletions lib/Mojo/Home.pm
Expand Up @@ -85,9 +85,12 @@ sub list_files {
$dir = File::Spec->catdir($root, split '/', ($dir || ''));
return [] unless -d $dir;
my @files;
find sub {
push @files, join '/',
File::Spec->splitdir(File::Spec->abs2rel($File::Find::name, $dir));
find {
wanted => sub {
push @files, join '/',
File::Spec->splitdir(File::Spec->abs2rel($File::Find::name, $dir));
},
no_chdir => 1
}, $dir;

return [sort @files];
Expand Down

0 comments on commit 675152d

Please sign in to comment.