瀏覽代碼

Merge

master
Dirk Alders 3 年之前
父節點
當前提交
b0b417fd57
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      mysync

+ 4
- 1
mysync 查看文件

@@ -68,7 +68,10 @@ def rsync_command(**kwargs):
68 68
     if localpath is not None:
69 69
         remotepath = path_filter(kwargs.get(PROP_REMOTE))
70 70
         skip = kwargs.get(PROP_SKIP)
71
-        cmd_l = ['rsync', '-avn' if DEBUG else '-av', '--delete', '--rsync-path="%s"' % RSYNC_REMOTE_COMMAND, remotepath, localpath]
71
+        if remotepath.find('@') != -1:
72
+            cmd_l = ['rsync', '-avn' if DEBUG else '-av', '--delete', remotepath, localpath]
73
+        else:
74
+            cmd_l = ['rsync', '-avn' if DEBUG else '-av', '--delete', '--rsync-path="%s"' % RSYNC_REMOTE_COMMAND, remotepath, localpath]
72 75
         if skip is not None:
73 76
             for skip_dir in skip:
74 77
                 if not skip_dir.endswith('/'):

Loading…
取消
儲存