projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fortune.
[feisty_meow.git]
/
scripts
/
files
/
safedel.pl
diff --git
a/scripts/files/safedel.pl
b/scripts/files/safedel.pl
index 30503fa50c4b0f87abbcd5e3b7f8d011e0e85040..14aca01473b815bedeb206710ac2b1e6bf784247 100644
(file)
--- 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.
# print "final list of whackees: @to_delete\n";
# we store the deleted files in a directory under the temporary directory.
- $temp_subdir = $TMP . "/zz_del_keep";
+ if (! -d $TMP) {
+ mkdir "$TMP", 0700;
+ if (! -d $TMP) {
+ die "the TMP directory $TMP could not be created!\n";
+ }
+ }
+ $temp_subdir = $TMP . "/zz_safedel_keep";
if (! -d $temp_subdir) {
if (! -d $temp_subdir) {
- mkdir "$temp_subdir", 07
77
;
+ mkdir "$temp_subdir", 07
00
;
# create the subdirectory under temp if missing.
if (! -d $temp_subdir) {
die "the directory $temp_subdir could not be created!\n";
# create the subdirectory under temp if missing.
if (! -d $temp_subdir) {
die "the directory $temp_subdir could not be created!\n";
@@
-123,7
+129,7
@@
sub safedel {
}
if (@deleted) {
print "Trashed [@deleted].\n";
}
if (@deleted) {
print "Trashed [@deleted].\n";
- open(REPORT, ">>$TMP/zz_safedel
.rp
t");
+ open(REPORT, ">>$TMP/zz_safedel
_report.tx
t");
local($printable_date) = scalar(localtime());
#&ctime(time);
local($printable_date) = scalar(localtime());
#&ctime(time);