Try to fix escaping of scp again.
authorCarl Hetherington <cth@carlh.net>
Wed, 28 Mar 2018 09:35:55 +0000 (10:35 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 28 Mar 2018 09:35:55 +0000 (10:35 +0100)
cdist

diff --git a/cdist b/cdist
index fbec567947d9575c8ba860c6a0d8e4cec81ba391..72c0b60a4f1d10aa4fe2470b0a05444d7d6d924c 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -178,7 +178,7 @@ def copyfile(a, b):
             host = b[:bc]
             path = b[bc+1:]
             temp_path = os.path.join(os.path.dirname(path), ".tmp." + os.path.basename(path))
-            command('scp %s %s:%s' % (scp_escape(a), host, scp_escape(temp_path)))
+            command('scp %s %s' % (scp_escape(a), scp_escape('%s:%s' % (host, temp_path)))
             command('ssh %s -- mv %s %s' % (host, scp_escape(temp_path), scp_escape(path)))
         else:
             command('scp %s %s' % (scp_escape(a), scp_escape(b)))