Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
khsrali committed Feb 4, 2025
1 parent 5d36b0f commit 575fc7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
12 changes: 3 additions & 9 deletions src/aiida/transports/plugins/ssh_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,17 +813,11 @@ async def compress_async(

copy_list = [remotesource]

copy_items = ' '.join([str(Path(item).relative_to(rootdir)) for item in copy_list])
# note: order of the flags is important
tar_command = (
f'tar -c{compression_flag!s}{'h' if dereference else ''}f {remotedestination!s} -C {rootdir!s} '
+ ' '.join(
[
str(
Path(item).relative_to(rootdir),
)
for item in copy_list
]
)
f"tar -c{compression_flag!s}{'h' if dereference else ''}f {remotedestination!s} -C {rootdir!s} "
+ copy_items
)

retval, stdout, stderr = await self.exec_command_wait_async(tar_command)
Expand Down
12 changes: 3 additions & 9 deletions src/aiida/transports/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,17 +1553,11 @@ def compress(

copy_list = [remotesource]

copy_items = ' '.join([str(Path(item).relative_to(rootdir)) for item in copy_list])
# note: order of the flags is important
tar_command = (
f'tar -c{compression_flag!s}{'h' if dereference else ''}f {remotedestination!s} -C {rootdir!s} '
+ ' '.join(
[
str(
Path(item).relative_to(rootdir),
)
for item in copy_list
]
)
f"tar -c{compression_flag!s}{'h' if dereference else ''}f {remotedestination!s} -C {rootdir!s} "
+ copy_items
)

retval, stdout, stderr = self.exec_command_wait(tar_command)
Expand Down

0 comments on commit 575fc7b

Please sign in to comment.