Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle filename conflicts during exports #270

Closed
eloquence opened this issue Jun 20, 2019 · 1 comment
Closed

Handle filename conflicts during exports #270

eloquence opened this issue Jun 20, 2019 · 1 comment

Comments

@eloquence
Copy link
Member

eloquence commented Jun 20, 2019

If a file filename.extension already exists in an export, a filename filename(1).extension should be assigned, with the number incremented as required. It's important that the number is before the extension, to not break file handling that is dependent on the extension (e.g., for DOCX files).

So, for example:

benign artichoke/secret_document.pdf
benign artichoke/secret_document(1).pdf
benign artichoke/secret_document(2).pdf
glued trajectory/trustme.exe

In terms of avoiding race conditions during numbering, we can assume that files are exported sequentially, i.e. the user can not kick off a new export operation until a previous one has been completed.

@eloquence eloquence changed the title Iterate on folder and filename management for exports Handle filename conflicts during exports Jul 17, 2019
@eloquence
Copy link
Member Author

Currently filename conflicts are handled via the subdirectory structure documented here:
https://github.com/freedomofpress/securedrop-export#export-folder-structure

We may need to reconsider other conflict resolution strategies if/when we revisit the export format; closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant