瀏覽代碼

Fix send of dir over sftp

Bertrand Chenal 7 年之前
父節點
當前提交
d76c1a2921
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      baker.py

+ 2 - 1
baker.py

@@ -540,7 +540,8 @@ def run_remote(task, host, env, cli):
                 else:
                 else:
                     for root, subdirs, files in os.walk(local_path):
                     for root, subdirs, files in os.walk(local_path):
                         rel_dir = os.path.relpath(root, local_path)
                         rel_dir = os.path.relpath(root, local_path)
-                        rem_dir = posixpath.join(remote_path, rel_dir)
+                        rel_dirs = os.path.split(rel_dir)
+                        rem_dir = posixpath.join(remote_path, *rel_dirs)
                         run_helper(client, 'mkdir -p {}'.format(rem_dir))
                         run_helper(client, 'mkdir -p {}'.format(rem_dir))
                         for f in files:
                         for f in files:
                             rel_f = os.path.join(root, f)
                             rel_f = os.path.join(root, f)