From: Dobrica Pavlinusic Date: Tue, 29 Nov 2011 21:21:03 +0000 (+0100) Subject: report errors better in send_file X-Git-Url: http://git.rot13.org/?p=cloudstore.git;a=commitdiff_plain;h=1dea23b598b595692fd5110044d23638e498945c report errors better in send_file --- diff --git a/gearman/send_file.pl b/gearman/send_file.pl index 68304e5..7652e39 100755 --- a/gearman/send_file.pl +++ b/gearman/send_file.pl @@ -34,6 +34,8 @@ $worker->register_function( send_file => sub { make_path $t_basedir unless -d $t_basedir; link $f_dir . $from => $t_dir . $to; + die "ERROR: $!" if $!; + return "send_file $f_dir $from -> $t_dir $to"; }); @@ -45,6 +47,7 @@ $worker->register_function( delete => sub { warn "# delete [$work]\n"; my $dir = home_dir($1) if $work =~ s/~(\w+)//; + my $login = $1; my $full = $dir . $work; if ( -d $full ) {