mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Merge pull request #54 from firstlookmedia/43_macos_crash
When finding PDF viewers, skip apps that do not have Info.plist files
This commit is contained in:
commit
7e398e2b28
1 changed files with 5 additions and 0 deletions
|
@ -332,6 +332,11 @@ class GlobalCommon(object):
|
||||||
|
|
||||||
# Load its plist file
|
# Load its plist file
|
||||||
plist_path = os.path.join(app_path, "Contents/Info.plist")
|
plist_path = os.path.join(app_path, "Contents/Info.plist")
|
||||||
|
|
||||||
|
# Skip if there's not an Info.plist
|
||||||
|
if not os.path.exists(plist_path):
|
||||||
|
continue
|
||||||
|
|
||||||
with open(plist_path, "rb") as f:
|
with open(plist_path, "rb") as f:
|
||||||
plist_data = f.read()
|
plist_data = f.read()
|
||||||
plist_dict = plistlib.loads(plist_data)
|
plist_dict = plistlib.loads(plist_data)
|
||||||
|
|
Loading…
Reference in a new issue