summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins@gmail.com>2015-03-24 02:21:33 (GMT)
committerWilliam Blevins <wblevins@gmail.com>2015-03-24 02:21:33 (GMT)
commitdae900cb134bc4fc74943f2c5a1f6a6303f9aa61 (patch)
tree2ff2ba871de46d88672cbcf93d13c47da5776c3e /src/engine
parentb6c7bd73535753a45dec87e8bb3b8584443d40dd (diff)
downloadSCons-dae900cb134bc4fc74943f2c5a1f6a6303f9aa61.zip
SCons-dae900cb134bc4fc74943f2c5a1f6a6303f9aa61.tar.gz
SCons-dae900cb134bc4fc74943f2c5a1f6a6303f9aa61.tar.bz2
Issue 2395: Symlink support hotfix.
Symlink contents now copied correctly with relative path when ( cwd != symlink directory ).
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Defaults.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index 3f60bc0..6500443 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -198,11 +198,10 @@ def copy_func(dest, src, symlinks=True):
shutil.copy2(file, dest)
return 0
elif os.path.islink(src):
- linkto = os.readlink(src)
if symlinks:
- return os.symlink(linkto, dest)
+ return os.symlink(os.readlink(src), dest)
else:
- return copy_func(dest, linkto, symlinks)
+ return copy_func(dest, os.path.realpath(src))
elif os.path.isfile(src):
return shutil.copy2(src, dest)
else: