From ec065966ac7bcb945402c3138e01c62389017260 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Wed, 15 Oct 2008 17:16:01 +0000 Subject: [PATCH] Handle symlink replacement more gracefully. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/scripts/mac/lipo-dir.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distrib/scripts/mac/lipo-dir.py b/distrib/scripts/mac/lipo-dir.py index 79678a515b..aaee9d0735 100644 --- a/distrib/scripts/mac/lipo-dir.py +++ b/distrib/scripts/mac/lipo-dir.py @@ -24,6 +24,8 @@ def lipo_walker(data, dirname, names): print "Successfully created %s" % outputfile else: if os.path.islink(fullpath): + if os.path.exists(outputfile): + os.remove(outputfile) linkto = os.readlink(fullpath) if linkto.startswith(ppc_basedir): @@ -51,4 +53,4 @@ if __name__ == "__main__": outputdir = sys.argv[3] os.path.walk(ppc_basedir, lipo_walker, None) - \ No newline at end of file +