cryptomator / cryptofs

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

Deduplicate pathToVault.resolve("d").resolve("xx").resolve("yyyyyy...y") #100

Open overheadhunter opened 3 years ago

overheadhunter commented 3 years ago

The expression pathToVault.resolve(Constants.DATA_DIR_NAME).resolve(dirHash.substring(0, 2)).resolve(dirHash.substring(2)) (or similar) is used in several places in this project. We should find a (clean!) way to deduplicate this (possibly including the dirHash calculation).

By "clean", I mean not just a new util class. Maybe we find some existing place, that can be injected (or is already present) in all required places.