# 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.
# 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";
if (-d $file) {
# ensure there aren't any read only files.
system("chmod -R u+rw \"$file\"");
# store the directory in the trash storage.
if (-d $file) {
# ensure there aren't any read only files.
system("chmod -R u+rw \"$file\"");
# store the directory in the trash storage.
# zip up the files into the safekeeper directory.
# recursively unlink in case zip doesn't remove the empty dir.
if (-d $file) {
# remove the directory itself if possible, since zip did not.
&recursively_zap_dirs($file);
}
# zip up the files into the safekeeper directory.
# recursively unlink in case zip doesn't remove the empty dir.
if (-d $file) {
# remove the directory itself if possible, since zip did not.
&recursively_zap_dirs($file);
}
$printable_date =~ s/\n//g;
print REPORT $printable_date . " -- safedel: \"temp" . $number . ".zip\" <= [@deleted]\n";
close(REPORT);
$printable_date =~ s/\n//g;
print REPORT $printable_date . " -- safedel: \"temp" . $number . ".zip\" <= [@deleted]\n";
close(REPORT);