Skip to content

Commit

Permalink
Merge pull request #5944 from prateekj117/recreate-store-directory
Browse files Browse the repository at this point in the history
fix: Recreate store directory if not there for existing source
  • Loading branch information
conorsch authored May 18, 2021
2 parents af07f76 + 1a096ce commit 41e79e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions securedrop/source_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ def submit() -> werkzeug.Response:
journalist_filename = g.source.journalist_filename
first_submission = g.source.interaction_count == 0

if not os.path.exists(current_app.storage.path(g.filesystem_id)):
current_app.logger.debug("Store directory not found for source '{}', creating one."
.format(g.source.journalist_designation))
os.mkdir(current_app.storage.path(g.filesystem_id))

if msg:
g.source.interaction_count += 1
fnames.append(
Expand Down

0 comments on commit 41e79e7

Please sign in to comment.