Permalink
Browse files

Handle skipped files due to condition headers in the cmd_sync_remote2…

…remote function too.
  • Loading branch information...
1 parent 07e8454 commit 4d772d2aa5d426344200db439fc86bf38c07a284 @bladealslayer committed with Oct 12, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 s3cmd
View
3 s3cmd
@@ -648,6 +648,9 @@ def cmd_sync_remote2remote(args):
extra_headers = copy(cfg.extra_headers)
try:
response = s3.object_copy(src_uri, dst_uri, extra_headers)
+ if response['status'] == 412:
+ output("Skipping file %s" % src_uri)
+ continue
output("File %(src)s copied to %(dst)s" % { "src" : src_uri, "dst" : dst_uri })
except S3Error, e:
error("File %(src)s could not be copied: %(e)s" % { "src" : src_uri, "e" : e })

0 comments on commit 4d772d2

Please sign in to comment.