From 32da174f8db7523b52b646180c12b49c4d4535a7 Mon Sep 17 00:00:00 2001 From: philpotisk <55081379+philpotisk@users.noreply.github.com> Date: Tue, 6 Jun 2023 12:31:40 +0200 Subject: [PATCH] fix: did:web-based alias to load keys (#313) --- .../kotlin/id/walt/services/hkvstore/FileSystemHKVStore.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/id/walt/services/hkvstore/FileSystemHKVStore.kt b/src/main/kotlin/id/walt/services/hkvstore/FileSystemHKVStore.kt index b84b5251..1a4d6b16 100644 --- a/src/main/kotlin/id/walt/services/hkvstore/FileSystemHKVStore.kt +++ b/src/main/kotlin/id/walt/services/hkvstore/FileSystemHKVStore.kt @@ -55,7 +55,7 @@ class FileSystemHKVStore(configPath: String) : HKVStoreService() { private fun hashIfNeeded(path: Path): File { if (path.name.length > configuration.maxKeySize) { - val hashedFileNameBytes = DigestUtils.sha3_512(path.nameWithoutExtension) + val hashedFileNameBytes = DigestUtils.sha3_512(path.name) val hashedFileName = Base32().encodeToString(hashedFileNameBytes).replace("=", "").replace("+", "") //val ext = extension @@ -64,7 +64,7 @@ class FileSystemHKVStore(configPath: String) : HKVStoreService() { val newPath = path.parent.resolve(newName) - storeHashMapping(path.nameWithoutExtension, newName) + storeHashMapping(path.name, newName) logger.debug { "File mapping is hashed: Path was \"${path.absolutePathString()}\", new path is $newPath" } return dataDirCombinePath(dataDirRelativePath(newPath))