diff options
Diffstat (limited to 'bin/hashl')
-rwxr-xr-x | bin/hashl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5,11 +5,9 @@ use strict; use warnings; use 5.010; -use autodie; use App::Hashl; use Cwd; -use Digest::SHA qw(sha1_hex); use File::Copy; use File::Find; use Getopt::Long; @@ -90,7 +88,8 @@ sub copy_file { mkdirs($incoming_dir, $base); } - copy($file, "${to}/${base}"); + copy($file, "${to}/${base}") + or die("Cannot copy ${file} to ${to}/${base}: $!\n"); } sub db_find_new { @@ -192,7 +191,8 @@ sub mkdirs { for my $dir (split(qr{/}, $new)) { $base .= "/$dir"; if (! -d $base) { - mkdir($base); + mkdir($base) + or die("Cannot create ${base}: $!\n"); } } } |