From a4eae07108f12ce16ca6be610e89ab6d8a22e56c Mon Sep 17 00:00:00 2001 From: odrling Date: Fri, 18 Mar 2022 15:33:56 +0100 Subject: [PATCH] osx-fix-libs: fix relative symlinks with same name --- tools/osx-fix-libs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/osx-fix-libs.py b/tools/osx-fix-libs.py index 7a7930d88..a8eba8635 100644 --- a/tools/osx-fix-libs.py +++ b/tools/osx-fix-libs.py @@ -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: