Skip to content

Commit e56821c

Browse files
committed
Remove old symlink before creating new symlink
(cherry picked from commit d52a159)
1 parent 4000085 commit e56821c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils/recursive-lipo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def merge_lipo_files(src_root_dirs, file_list, copy_verbatim_subpaths,
6363
if all([os.path.islink(item) for item in file_paths]):
6464
# It's a symlink in all found instances, copy the link.
6565
print("-- Creating symlink %s" % dest_path)
66+
# Remove symlink if it already exists
67+
if os.path.islink(dest_path):
68+
os.remove(dest_path)
6669
os.symlink(os.readlink(file_paths[0]), dest_path)
6770
elif all([os.path.isdir(item) for item in file_paths]):
6871
# It's a subdir in all found instances.

0 commit comments

Comments
 (0)