Skip to content

Commit 02e8bd5

Browse files
committed
BoutiquesInputCopier preserves internal symlinks
1 parent 3c6f08b commit 02e8bd5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

BrainPortal/lib/boutiques_input_copier.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,13 @@ def setup #:nodoc:
170170

171171
self.addlog("#{basename}: Copy input for '#{userfile_name}' in task work directory")
172172

173-
# Remove the userfile from the working directory
173+
# Remove the symbolic link to the userfile's cache from the working directory
174174
File.delete(userfile_name)
175175

176-
rsync_cmd = "rsync -a -L --no-g --chmod=u=rwX,g=rX,Dg+s,o=r --delete #{userfile_cache_full_path.to_s.bash_escape} #{self.full_cluster_workdir.to_s.bash_escape} 2>&1"
176+
# Based on type, needed for rsync
177+
need_slash = userfile.is_a?(SingleFile) ? "" : "/"
178+
179+
rsync_cmd = "rsync -a --no-g --chmod=u=rwX,g=rX,Dg+s,o=r --delete #{userfile_cache_full_path.to_s.bash_escape}#{need_slash} #{self.full_cluster_workdir.to_s.bash_escape}/#{userfile_name.bash_escape} 2>&1"
177180
# self.addlog("Running: #{rsync_cmd}")
178181
rsyncout = bash_this(rsync_cmd)
179182

0 commit comments

Comments
 (0)