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

Feature/#88 improve backup strategy #90

Merged
merged 3 commits into from
Sep 28, 2020

Conversation

infeo
Copy link
Member

@infeo infeo commented Sep 25, 2020

This PR closes #88

The backup strategy is now altered by only throwing an exception, if the masterkey file cannot be read. All other errors (comparsion with backup file, corrupt backup file, etc) are only logged on WARN level, but do not throw an exception.

The thought behind it is, that the backup strategy is only a best-effort attempt and for an application it is more important getting access to encrypted data rather than having a backup.

Additionally the method is renamed to better show its functionality.

* create backup if it does no exist
* otherwise compare already existing backup file with masterkey
* on io error or corrupt backup,  _only_ log it (except reading masterkey file, then throw)
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ src/main/java/org/cryptomator/cryptofs/common/MasterkeyBackupHelper.java  -1
         

See the complete overview on Codacy

@infeo infeo merged commit e394887 into develop Sep 28, 2020
@infeo infeo deleted the feature/#88-improve-backup-strategy branch September 29, 2020 08:16
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

Successfully merging this pull request may close these issues.

Masterkey backup strategies: Not all cases covered.
4 participants