mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
Ensure the scratch directory exists before consuming this source (#5579)
This commit is contained in:
parent
b0c305e852
commit
2aea220c6d
1 changed files with 3 additions and 0 deletions
|
|
@ -232,6 +232,9 @@ class Command(BaseCommand):
|
||||||
if not os.path.isdir(directory):
|
if not os.path.isdir(directory):
|
||||||
raise CommandError(f"Consumption directory {directory} does not exist")
|
raise CommandError(f"Consumption directory {directory} does not exist")
|
||||||
|
|
||||||
|
# Consumer will need this
|
||||||
|
settings.SCRATCH_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if recursive:
|
if recursive:
|
||||||
for dirpath, _, filenames in os.walk(directory):
|
for dirpath, _, filenames in os.walk(directory):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue