From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:07:04 +0000 (-0800) Subject: Ensure the scratch directory exists before consuming this source (#5579) X-Git-Tag: v2.4.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aea220c6d76ad8109f43f6065f50786ddce4607;p=thirdparty%2Fpaperless-ngx.git Ensure the scratch directory exists before consuming this source (#5579) --- diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.py index 16bcf9bd90..9195305446 100644 --- a/src/documents/management/commands/document_consumer.py +++ b/src/documents/management/commands/document_consumer.py @@ -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: