forked from mia/Aegisub
macos: attempt to fix the installer build
Try and fix an issue when a symlink would link to a path with the same basename, without actually having a mac system available to test.
This commit is contained in:
parent
2bf4f17e58
commit
5bde34ff3e
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,11 @@ def collectlibs(lib, masterlist, targetdir):
|
|||
basename = os.path.basename(check)
|
||||
target = os.path.join(targetdir, basename)
|
||||
|
||||
if os.path.islink(target):
|
||||
# If a library was a symlink to a file with the same name in another directory,
|
||||
# this could otherwise cause a FileNotFoundError
|
||||
os.remove(target)
|
||||
|
||||
if os.path.isfile(check) and not os.path.islink(check):
|
||||
try:
|
||||
shutil.copy(check, target)
|
||||
|
|
Loading…
Reference in a new issue