From a0d1a6830244679340f60ac4815540d852827edd Mon Sep 17 00:00:00 2001 From: deeplow Date: Tue, 20 Jun 2023 19:38:01 +0300 Subject: [PATCH] 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. --- dangerzone/conversion/doc_to_pixels.py | 4 ++-- dangerzone/isolation_provider/container.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dangerzone/conversion/doc_to_pixels.py b/dangerzone/conversion/doc_to_pixels.py index 23db83a..aa92088 100644 --- a/dangerzone/conversion/doc_to_pixels.py +++ b/dangerzone/conversion/doc_to_pixels.py @@ -272,13 +272,13 @@ class DocumentToPixels(DangerzoneConverter): self.update_progress("Converted document to pixels") - # Move converted files into /dangerzone + # Move converted files into /tmp/dangerzone for filename in ( glob.glob("/tmp/page-*.rgb") + glob.glob("/tmp/page-*.width") + glob.glob("/tmp/page-*.height") ): - shutil.move(filename, "/dangerzone") + shutil.move(filename, "/tmp/dangerzone") async def main() -> int: diff --git a/dangerzone/isolation_provider/container.py b/dangerzone/isolation_provider/container.py index 6b71b63..ed5f38f 100644 --- a/dangerzone/isolation_provider/container.py +++ b/dangerzone/isolation_provider/container.py @@ -269,7 +269,7 @@ class Container(IsolationProvider): "-v", f"{copied_file}:/tmp/input_file:Z", "-v", - f"{pixel_dir}:/dangerzone:Z", + f"{pixel_dir}:/tmp/dangerzone:Z", "-e", f"ENABLE_TIMEOUTS={self.enable_timeouts}", ] @@ -287,7 +287,7 @@ class Container(IsolationProvider): ] extra_args = [ "-v", - f"{pixel_dir}:/dangerzone:Z", + f"{pixel_dir}:/tmp/dangerzone:Z", "-v", f"{safe_dir}:/safezone:Z", "-e",