Browse code

fix single file sync local2remote traceback, bug #128

Fixes https://github.com/s3tools/s3cmd/issues/128

In the single file transfer case, the remote_list was getting created
as a dict, rather than as a SortedDict as it should be.

Matt Domsch authored on 2013/03/06 06:11:11
Showing 1 changed files
... ...
@@ -1058,7 +1058,8 @@ def cmd_sync_local2remote(args):
1058 1058
             ## Make remote_key same as local_key for comparison if we're dealing with only one file
1059 1059
             remote_list_entry = remote_list[remote_list.keys()[0]]
1060 1060
             # Flush remote_list, by the way
1061
-            remote_list = { local_list.keys()[0] : remote_list_entry }
1061
+            remote_list = SortedDict()
1062
+            remote_list[local_list.keys()[0]] =  remote_list_entry
1062 1063
 
1063 1064
         local_list, remote_list, update_list, copy_pairs = compare_filelists(local_list, remote_list, src_remote = False, dst_remote = True, delay_updates = cfg.delay_updates)
1064 1065