Skip to content

Commit 2b0aef8

Browse files
committed
FIX: Use realpath to determine hardlink source
1 parent 40b2cb8 commit 2b0aef8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nipype/utils/filemanip.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def nipype_hardlink_wrapper(raw_src, raw_dst):
4242
If the hardlink fails, then fall back to using
4343
a standard copy.
4444
"""
45-
src = os.path.normpath(raw_src)
45+
# Use realpath to avoid hardlinking symlinks
46+
src = os.path.realpath(raw_src)
47+
# Use normpath, in case destination is a symlink
4648
dst = os.path.normpath(raw_dst)
4749
del raw_src
4850
del raw_dst

0 commit comments

Comments
 (0)