mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
GlobalCommon does not need temp dirs, and fix bug with finding Mac PFD viewers
This commit is contained in:
parent
80d1d2e583
commit
791723db20
1 changed files with 3 additions and 12 deletions
|
@ -32,17 +32,6 @@ class GlobalCommon(object):
|
||||||
# Qt app
|
# Qt app
|
||||||
self.app = app
|
self.app = app
|
||||||
|
|
||||||
# Temporary directory to store pixel data
|
|
||||||
# Note in macOS, temp dirs must be in /tmp (or a few other paths) for Docker to mount them
|
|
||||||
if platform.system() == "Windows":
|
|
||||||
self.pixel_dir = tempfile.TemporaryDirectory(prefix="dangerzone-pixel-")
|
|
||||||
self.safe_dir = tempfile.TemporaryDirectory(prefix="dangerzone-safe-")
|
|
||||||
else:
|
|
||||||
self.pixel_dir = tempfile.TemporaryDirectory(
|
|
||||||
prefix="/tmp/dangerzone-pixel-"
|
|
||||||
)
|
|
||||||
self.safe_dir = tempfile.TemporaryDirectory(prefix="/tmp/dangerzone-safe-")
|
|
||||||
|
|
||||||
# Name of input file
|
# Name of input file
|
||||||
self.document_filename = None
|
self.document_filename = None
|
||||||
|
|
||||||
|
@ -367,7 +356,9 @@ class GlobalCommon(object):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
with open(plist_path, "rb") as f:
|
with open(plist_path, "rb") as f:
|
||||||
plist_dict = plistlib.load(plist_path)
|
plist_data = f.read()
|
||||||
|
|
||||||
|
plist_dict = plistlib.loads(plist_data)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
plist_dict.get("CFBundleName")
|
plist_dict.get("CFBundleName")
|
||||||
|
|
Loading…
Reference in a new issue