-
Notifications
You must be signed in to change notification settings - Fork 182
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
Option to move untrusted files into subdirectory after conversion #255
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3f7ff63
to
81b4b1c
Compare
Dangerzone has refered to untrusted files in the past as suspicious. Should we name the directory and the option as suspicious? |
On the other hand, the non-suspicious documents are suffixed as "-safe", so having an "unsafe" directory makes the difference clearer. I'd vote to keep it as "unsafe" personally. |
apyrgio
reviewed
Nov 23, 2022
apyrgio
reviewed
Nov 23, 2022
apyrgio
reviewed
Nov 23, 2022
Move the 'safe_extension' widget to the top of the settings and the save location widget to the bottom.
8cc016e
to
34db094
Compare
With the added new widgets not all widgets in the settings fit perfectly.
For some reason, mypy was complaining that these statements were no longer unreachable, but now it no longer is.
Fixes #251 by implementing the logic for archiving a document after conversion into a default sub-directory.
Verifies that the archive directory can be created as soon as the document is set to be archived.
Additionally this adds the pytest-mock dev dependency to be able to mock certain methods.
Disable the option to move original documents to 'unsafe' subdirectory when said directory is not writable.
34db094
to
49b7736
Compare
Had to make some final layout adjustments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follows what's been outlined in #251:
![opt3](https://user-images.githubusercontent.com/47065258/203129589-d93ab10b-be35-4298-9dd2-d9dc12059933.png)
The only thing missing would be a way to detect a case where an archive directory cannot be created where the original documents are located. This could show in the GUI by disabling the option to archive, or the CLI by giving out an error.