If a file copy fails, log the reason
This commit is contained in:
@@ -126,7 +126,10 @@ sub process_completed_directory {
|
|||||||
my $output_filename = $output_dir . '/' . $completed_torrent;
|
my $output_filename = $output_dir . '/' . $completed_torrent;
|
||||||
|
|
||||||
# Copy the file over to the media share
|
# Copy the file over to the media share
|
||||||
copy_to_media_share($completed_filename, $output_filename) or next;
|
if (!copy_to_media_share($completed_filename, $output_filename)) {
|
||||||
|
$log->error("Failed to copy $completed_filename to $output_filename: $!");
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
# Attempt to rename the file
|
# Attempt to rename the file
|
||||||
my $final_filename = $output_filename;
|
my $final_filename = $output_filename;
|
||||||
|
|||||||
Reference in New Issue
Block a user