From b05e6b5ce5f7b901d70b019841dbbeac93c93923 Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Fri, 14 Dec 2012 15:07:06 -0500 Subject: [PATCH] now making the TMP directory if it doesn't exist. --- scripts/files/safedel.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"; -- 2.34.1