From: Fred T. Hamster Date: Fri, 14 Dec 2012 20:07:06 +0000 (-0500) Subject: now making the TMP directory if it doesn't exist. X-Git-Tag: 2.140.90~1169^2 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=b05e6b5ce5f7b901d70b019841dbbeac93c93923 now making the TMP directory if it doesn't exist. --- diff --git a/scripts/files/safedel.pl b/scripts/files/safedel.pl index 30503fa5..c009cc2a 100644 --- a/scripts/files/safedel.pl +++ b/scripts/files/safedel.pl @@ -72,9 +72,15 @@ sub safedel { # print "final list of whackees: @to_delete\n"; # we store the deleted files in a directory under the temporary directory. + if (! -d $TMP) { + mkdir "$TMP", 0700; + if (! -d $TMP) { + die "the TMP directory $TMP could not be created!\n"; + } + } $temp_subdir = $TMP . "/zz_del_keep"; if (! -d $temp_subdir) { - mkdir "$temp_subdir", 0777; + mkdir "$temp_subdir", 0700; # create the subdirectory under temp if missing. if (! -d $temp_subdir) { die "the directory $temp_subdir could not be created!\n";