diff options
author | William Blevins <wblevins@gmail.com> | 2015-03-24 02:21:33 (GMT) |
---|---|---|
committer | William Blevins <wblevins@gmail.com> | 2015-03-24 02:21:33 (GMT) |
commit | dae900cb134bc4fc74943f2c5a1f6a6303f9aa61 (patch) | |
tree | 2ff2ba871de46d88672cbcf93d13c47da5776c3e /src | |
parent | b6c7bd73535753a45dec87e8bb3b8584443d40dd (diff) | |
download | SCons-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')
-rw-r--r-- | src/engine/SCons/Defaults.py | 5 |
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: |