Use /tmp/dangerzone for Qubes compatibility

For using in containers, creating a /dangerzone directory is fine but it
is more standard to do this in /tmp.
This commit is contained in:
deeplow 2023-06-20 19:38:01 +03:00 committed by Alex Pyrgiotis
parent 814d533c3b
commit a0d1a68302
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
2 changed files with 4 additions and 4 deletions

View file

@ -272,13 +272,13 @@ class DocumentToPixels(DangerzoneConverter):
self.update_progress("Converted document to pixels") self.update_progress("Converted document to pixels")
# Move converted files into /dangerzone # Move converted files into /tmp/dangerzone
for filename in ( for filename in (
glob.glob("/tmp/page-*.rgb") glob.glob("/tmp/page-*.rgb")
+ glob.glob("/tmp/page-*.width") + glob.glob("/tmp/page-*.width")
+ glob.glob("/tmp/page-*.height") + glob.glob("/tmp/page-*.height")
): ):
shutil.move(filename, "/dangerzone") shutil.move(filename, "/tmp/dangerzone")
async def main() -> int: async def main() -> int:

View file

@ -269,7 +269,7 @@ class Container(IsolationProvider):
"-v", "-v",
f"{copied_file}:/tmp/input_file:Z", f"{copied_file}:/tmp/input_file:Z",
"-v", "-v",
f"{pixel_dir}:/dangerzone:Z", f"{pixel_dir}:/tmp/dangerzone:Z",
"-e", "-e",
f"ENABLE_TIMEOUTS={self.enable_timeouts}", f"ENABLE_TIMEOUTS={self.enable_timeouts}",
] ]
@ -287,7 +287,7 @@ class Container(IsolationProvider):
] ]
extra_args = [ extra_args = [
"-v", "-v",
f"{pixel_dir}:/dangerzone:Z", f"{pixel_dir}:/tmp/dangerzone:Z",
"-v", "-v",
f"{safe_dir}:/safezone:Z", f"{safe_dir}:/safezone:Z",
"-e", "-e",