or abort "FATAL: create test file in inbox: $!";
close $test;
unless (rename $infile, $scratchfile and -f $scratchfile) {
+ my $err = "$!";
unlink $infile;
- abort "FATAL: could not rename file from inbox to scratchpad: $!";
+ abort "FATAL: could not rename file from inbox to scratchpad: $err";
}
unlink $scratchfile; # test complete
}
or abort "FATAL: create test file in staging directory: $!";
close $test;
unless (rename $stagefile, $pubfile and -f $pubfile) {
+ my $err = "$!";
unlink $stagefile;
- abort "FATAL: could not rename file from staging to public: $!";
+ abort "FATAL: could not rename file from staging to public: $err";
}
unless (rename $pubfile, $arcfile and -f $arcfile) {
+ my $err = "$!";
unlink $pubfile;
- abort "FATAL: could not rename file from public to archive: $!";
+ abort "FATAL: could not rename file from public to archive: $err";
}
unlink $arcfile; # test complete
}