From 10da6dc3456849a97a4af0b765775ac21ed8f46c Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Mon, 6 Nov 2017 00:14:44 -0500 Subject: [PATCH] fixed issue if no loading dock --- scripts/files/filename_helper.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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}$/; -- 2.34.1