Skip to content

Commit

Permalink
fix: Recreate store directory is not there for existing source
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekj117 committed May 15, 2021
1 parent 6eb5ac8 commit 1a096ce
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 1a096ce

Please sign in to comment.