From: Fred T. Hamster Date: Mon, 6 Nov 2017 05:14:44 +0000 (-0500) Subject: fixed issue if no loading dock X-Git-Tag: 2.140.90~64 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=10da6dc3456849a97a4af0b765775ac21ed8f46c fixed issue if no loading dock --- diff --git a/scripts/files/filename_helper.pl b/scripts/files/filename_helper.pl index b4218166..50b71edc 100644 --- a/scripts/files/filename_helper.pl +++ b/scripts/files/filename_helper.pl @@ -408,7 +408,8 @@ return; } local *DIR; - opendir DIR, $dir or die "opendir $dir: $!"; + # if we can't open the dir, just skip to the next one. + opendir DIR, $dir or next; while ($_ = readdir DIR) { next if /^\.{1,2}$/; my $path = "$dir/$_"; @@ -428,7 +429,8 @@ sub find_directories { my $dir; foreach $dir (@_) { local *DIR; - opendir DIR, $dir or die "opendir $dir: $!"; + # if we can't open the dir, just skip to the next one. + opendir DIR, $dir or next; while ($_ = readdir DIR) { # skip if it's current or parent dir. next if /^\.{1,2}$/; @@ -455,7 +457,8 @@ sub find_files { next; } local *DIR; - opendir DIR, $dir or die "opendir $dir: $!"; + # if we can't open the dir, just skip to the next one. + opendir DIR, $dir or next; while ($_ = readdir DIR) { # skip if it's current or parent dir. next if /^\.{1,2}$/;