aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Goddard <timg@catalyst.net.nz>2012-02-10 13:07:31 +1300
committerTimothy Goddard <timg@catalyst.net.nz>2012-02-10 13:07:31 +1300
commitfc027075cc9a4b3500ce213c94f76128a098c10c (patch)
treed9e1085fa8413bc3a57ab5ebafb3baeb65316f8f
parentReplace tabs. (diff)
downloadcheckem-fc027075cc9a4b3500ce213c94f76128a098c10c.tar.gz
checkem-fc027075cc9a4b3500ce213c94f76128a098c10c.zip
Prevent File::Find from changing directory, which was breaking tests within the wanted function
-rwxr-xr-xcheckem2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkem b/checkem
index f4dcdfb..aa43e70 100755
--- a/checkem
+++ b/checkem
@@ -96,7 +96,7 @@ sub wanted {
}
# ... and start the find process on the directory!
-find \&wanted, $dir;
+find {'wanted' => \&wanted, no_chdir => 1}, $dir;
# Get a sorted list of the sizes keys by filesize. This groups them nicely.
my @files_sorted = sort {$sizes{$a} <=> $sizes{$b}} keys %sizes;