Skip to content
Browse files

Merge from trunk (r275):

* s3cmd: Delete local files with "sync --delete-removed"



git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/branches/0.9.8.x@276 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information...
1 parent a8df580 commit 6056273e48059c6a293a6021a5ae72b3b96b591f @mludvig mludvig committed Nov 29, 2008
Showing with 11 additions and 5 deletions.
  1. +5 −0 ChangeLog
  2. +6 −5 s3cmd
View
5 ChangeLog
@@ -1,3 +1,8 @@
+2008-11-29 Michal Ludvig <michal@logix.cz>
+
+ Merge from trunk (r275):
+ * s3cmd: Delete local files with "sync --delete-removed"
+
2008-11-07 Michal Ludvig <michal@logix.cz>
* Released version 0.9.8.4
View
11 s3cmd
@@ -439,6 +439,10 @@ def cmd_sync_remote2local(src, dst):
src_uri = S3Uri(src)
dst_uri = S3Uri(dst)
+ src_base = src_uri.uri()
+ dst_base = dst_uri.path()
+ if not src_base[-1] == "/": src_base += "/"
+
rem_list = _get_filelist_remote(src_uri)
rem_count = len(rem_list)
@@ -453,8 +457,8 @@ def cmd_sync_remote2local(src, dst):
for file in loc_list:
if cfg.delete_removed:
- # os.unlink(file)
- output("deleted '%s'" % file)
+ os.unlink(dst_base + file)
+ output("deleted '%s'" % (dst_base + file))
else:
output("not-deleted '%s'" % file)
@@ -464,9 +468,6 @@ def cmd_sync_remote2local(src, dst):
timestamp_start = time.time()
seq = 0
dir_cache = {}
- src_base = src_uri.uri()
- dst_base = dst_uri.path()
- if not src_base[-1] == "/": src_base += "/"
file_list = rem_list.keys()
file_list.sort()
for file in file_list:

0 comments on commit 6056273

Please sign in to comment.
Something went wrong with that request. Please try again.