mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
When finding PDF viewers, skip apps that do not have Info.plist files (as is the case with com.apple.system-library)
This commit is contained in:
parent
bacc2d714e
commit
2c0f0acbdf
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