From 37dc7913014d7475ec771ad5e73c4538ac4f0d70 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:54:28 -0700 Subject: [PATCH] Fix: fix auto-clean PDFs, create parent dir for storing unmodified original (#8157) --- src/documents/consumer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 05e21671b..1cd8ad509 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -411,6 +411,7 @@ class ConsumerPlugin( self.unmodified_original = ( Path(tempdir.name) / Path("uo") / Path(self.filename) ) + self.unmodified_original.parent.mkdir(exist_ok=True) copy_file_with_basic_stats( self.input_doc.original_file, self.unmodified_original,