Fix: Allows pre-consume scripts to modify the working path again (#5260)

* Allows pre-consume scripts to modify the working path again and generally cleans up some confusion about working copy vs original
This commit is contained in:
Trenton H
2024-01-05 21:01:57 -08:00
committed by GitHub
parent 3115106dc1
commit a82e3771ae
5 changed files with 37 additions and 28 deletions

View File

@@ -322,7 +322,9 @@ class DocumentParser(LoggingMixin):
self.logging_group = logging_group
self.settings = self.get_settings()
os.makedirs(settings.SCRATCH_DIR, exist_ok=True)
self.tempdir = tempfile.mkdtemp(prefix="paperless-", dir=settings.SCRATCH_DIR)
self.tempdir = Path(
tempfile.mkdtemp(prefix="paperless-", dir=settings.SCRATCH_DIR),
)
self.archive_path = None
self.text = None