summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r--src/engine/SCons/Node/FS.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index eb23cd8..ece238a 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -60,6 +60,12 @@ import SCons.Warnings
# there should be *no* changes to the external file system(s)...
#
+if hasattr(os, 'symlink'):
+ def _existsp(p):
+ return os.path.exists(p) or os.path.islink(p)
+else:
+ _existsp = os.path.exists
+
def LinkFunc(target, source, env):
src = source[0].path
dest = target[0].path
@@ -940,7 +946,7 @@ class File(Entry):
def remove(self):
"""Remove this file."""
- if os.path.exists(self.path):
+ if _existsp(self.path):
os.unlink(self.path)
return 1
return None