Skip to content

Commit e1830f2

Browse files
authored
Merge pull request #132 from njzjz/tar
ssh: archieve files the symlink points to instead of symlink iteself
2 parents 6474e4a + 006dba2 commit e1830f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpdispatcher/ssh_context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,18 +526,18 @@ def _get_files(self,
526526
per_nfile = 100
527527
ntar = len(files) // per_nfile + 1
528528
if ntar <= 1:
529-
self.block_checkcall('tar czf %s %s' % (of, " ".join(files)))
529+
self.block_checkcall('tar czfh %s %s' % (of, " ".join(files)))
530530
else:
531531
of_tar = self.submission.submission_hash + '.tar'
532532
for ii in range(ntar):
533533
ff = files[per_nfile * ii : per_nfile * (ii+1)]
534534
if ii == 0:
535535
# tar cf for the first time
536-
self.block_checkcall('tar cf %s %s' % (of_tar, " ".join(ff)))
536+
self.block_checkcall('tar cfh %s %s' % (of_tar, " ".join(ff)))
537537
else:
538538
# append using tar rf
539539
# -r, --append append files to the end of an archive
540-
self.block_checkcall('tar rf %s %s' % (of_tar, " ".join(ff)))
540+
self.block_checkcall('tar rfh %s %s' % (of_tar, " ".join(ff)))
541541
# compress the tar file using gzip, and will get a tar.gz file
542542
# overwrite considering dpgen may stop and restart
543543
# -f, --force force overwrite of output file and compress links

0 commit comments

Comments
 (0)