Skip to content

Commit 4a69774

Browse files
committed
Call fsaccess.realpath before comparing paths in _relocate.
1 parent 29d8279 commit 4a69774

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cwltool/process.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,13 @@ def _collectDirEntries(
354354
yield from _collectDirEntries(sub_obj)
355355

356356
def _relocate(src: str, dst: str) -> None:
357+
src = fs_access.realpath(src)
358+
dst = fs_access.realpath(dst)
359+
357360
if src == dst:
358361
return
359362

360363
# If the source is not contained in source_directories we're not allowed to delete it
361-
src = fs_access.realpath(src)
362364
src_can_deleted = any(
363365
os.path.commonprefix([p, src]) == p for p in source_directories
364366
)

0 commit comments

Comments
 (0)