osx-fix-libs: fix relative symlinks with same name

This commit is contained in:
odrling 2022-03-18 15:33:56 +01:00
parent 2f00aa2176
commit a4eae07108
No known key found for this signature in database
GPG Key ID: E24CA7508C27AF5B
1 changed files with 4 additions and 0 deletions

View File

@ -103,6 +103,10 @@ def collectlibs(lib, masterlist, targetdir):
if os.path.islink(check):
link_dst = os.readlink(check)
if os.path.basename(check) == os.path.basename(link_dst):
check = os.path.join(os.path.dirname(check), link_dst)
continue
try:
os.symlink(link_dst, target)
except FileExistsError: