summaryrefslogtreecommitdiff
path: root/tools/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/util.py')
-rw-r--r--tools/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/util.py b/tools/util.py
index b77f17282..368294f45 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -92,6 +92,8 @@ def green_ok():
def remove_and_symlink(target, name, target_is_dir=False):
+ if os.name != "nt" and os.path.islink(name):
+ return
try:
# On Windows, directory symlink can only be removed with rmdir().
if os.name == "nt" and os.path.isdir(name):