cryptomator / cryptofs

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

Migration to format 7 stops when file with new filename already exists #75

Closed overheadhunter closed 4 years ago

overheadhunter commented 4 years ago

When migrating a file from oldPath to newPath and newPath already exists, the migration traversal TERMINATEs:

https://github.com/cryptomator/cryptofs/blob/6665a0d3bc9d3ea50db0b892fccf7a21b591af09/src/main/java/org/cryptomator/cryptofs/migration/v7/MigratingVisitor.java#L54-L60

The assumption that this can only happen when stumbling upon already migrated files is false: Another possibility is that multiple "conflict" files exists that claim the same newPath.

While logging such occurrences, we should not terminate traversal.

Downstream bug: cryptomator/cryptomator#1124