]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Ensure the scratch directory exists before consuming this source (#5579)
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Sun, 28 Jan 2024 17:07:04 +0000 (09:07 -0800)
committerGitHub <noreply@github.com>
Sun, 28 Jan 2024 17:07:04 +0000 (09:07 -0800)
src/documents/management/commands/document_consumer.py

index 16bcf9bd90b3cf2ad92d3e8b2e191808e2f2f550..9195305446d3c557b888aa851903c87738fb9598 100644 (file)
@@ -232,6 +232,9 @@ class Command(BaseCommand):
         if not os.path.isdir(directory):
             raise CommandError(f"Consumption directory {directory} does not exist")
 
+        # Consumer will need this
+        settings.SCRATCH_DIR.mkdir(parents=True, exist_ok=True)
+
         if recursive:
             for dirpath, _, filenames in os.walk(directory):
                 for filename in filenames: