cryptomator / cryptofs

Java Filesystem Provider with integrated encryption
GNU Affero General Public License v3.0
94 stars 35 forks source link

Use dirid file in orphan dir fix #127

Closed infeo closed 2 years ago

infeo commented 2 years ago

Closes #126.

This PR allows to restore also filenames of an orphaned directory, if the dirId file is present.

It is implemented in a failsafe way: If the dirId file does not exists, cannot be read or does not match, the orphan cipher dir is recovered without it.

infeo commented 2 years ago

I just noticed, this PR is not done yet: Since the stepparent dir is created manually, we do not add a dirid file to it, although we should. Because once the user moves the recovered directory, he won't be able to recover the files names again.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

90.6% 90.6% Coverage
0.0% 0.0% Duplication