From 0fa52bc64fc81f6e8dc1c55ed0580f016996b643 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 1 Aug 2020 03:28:01 +0200 Subject: [PATCH] Fix macdeploy script --- dist/macos/macdeploy.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/macos/macdeploy.py b/dist/macos/macdeploy.py index 1dc34626..d9c31a0e 100755 --- a/dist/macos/macdeploy.py +++ b/dist/macos/macdeploy.py @@ -192,9 +192,11 @@ def GetBrokenLibraries(binary): continue # unix style system library elif re.match(r'^\s*@executable_path', line) or re.match(r'^\s*@loader_path', line): # Potentially already fixed library - relative_path = os.path.join(*line.split('/')[3:]) - if not os.path.exists(os.path.join(frameworks_dir, relative_path)): - broken_libs['frameworks'].append(relative_path) + path = line.split('/')[3:] + if path: + relative_path = os.path.join(*path) + if not os.path.exists(os.path.join(frameworks_dir, relative_path)): + broken_libs['frameworks'].append(relative_path) elif re.search(r'\w+\.framework', line): broken_libs['frameworks'].append(line) else: