Browse code

Merge pull request #137 from mdomsch/bug/88

fix sync single remote file to existing local file traceback, bug 88

Michal Ludvig authored on 2013/03/11 09:02:20
Showing 1 changed files
... ...
@@ -746,6 +746,8 @@ def cmd_sync_remote2local(args):
746 746
     info(u"Summary: %d remote files to download, %d local files to delete, %d local files to hardlink" % (remote_count + update_count, local_count, copy_pairs_count))
747 747
 
748 748
     def _set_local_filename(remote_list, destination_base):
749
+        if len(remote_list) == 0:
750
+            return
749 751
         if not os.path.isdir(destination_base):
750 752
             ## We were either given a file name (existing or not) or want STDOUT
751 753
             if len(remote_list) > 1: