don't try to rename non-existing files
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 11 Oct 2011 14:53:05 +0000 (16:53 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 11 Oct 2011 14:53:05 +0000 (16:53 +0200)
lib/CloudStore/Store.pm

index aeeb9d5..8ab613b 100644 (file)
@@ -99,6 +99,11 @@ warn $_;
                                $self->blob_path($tmp);
                        } ( $from, $to );
 
+                       if ( ! -e $from_path ) {
+                               warn "SKIPPED $from_path: $!";
+                               next;
+                       }
+
                        warn "MV $from_path -> $to_path";
                        mkbasedir $to_path;
                        rename $from_path, $to_path;
@@ -294,7 +299,7 @@ sub rsync_transfer {
        } elsif ( $data->{itemize} =~ m/\*deleting/ ) {
                $self->remove_file($data);
        } else {
-               warn "IGNORED ",dump($data);
+               warn "IGNORED ",dump($data) if $ENV{DEBUG};
        }
        return $data;
 }