Commit a8dd57e3 authored by Gary Ruben (Monash University)'s avatar Gary Ruben (Monash University)
Browse files

reformed tar line to avoid leading period slash in filenames and match cpio behaviour

parent 40b1f560
......@@ -151,9 +151,9 @@ def send_directory(node, remote_login, src_path):
cmd_dest = escape_path(node.dest)
cmd_filename = escape_path(filename)
output = subprocess.run(
f"ssh {remote_login} 'cd {cmd_src};"
f"nice find -maxdepth 1 -type f -print0 |"
f"xargs -0 tar -cf - ' | cat > {cmd_dest}/{cmd_filename}.tar",
f'ssh {remote_login} "cd {cmd_src};'
f'nice find -maxdepth 1 -type f -printf \'%f\\0\' |'
f'xargs -0 tar -cf - " | cat > {cmd_dest}/{cmd_filename}.tar',
shell=True,
check=True
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment