From 74debe7363ea5bb5d26a6efdde407e16902bbfe9 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 29 Dec 2012 18:01:03 +0100 Subject: [PATCH] in build.py, remove existing files before creating symlinks --- tools/build/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build/build.py b/tools/build/build.py index ba21d522..0c9fb599 100755 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -318,7 +318,8 @@ def write_file(file, data): def write_link(source, target): print 'linking', source, 'to', target write_path(target) - if os.path.lexists(target): + # remove files, symlinks *and broken symlinks* + if os.path.exists(target) or os.path.lexists(target): os.unlink(target) os.symlink(source, target)