From 5b6e6b8cc1ff71c85a485a5ad713609a322a7553 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Tue, 3 Nov 2020 12:45:05 +0000 Subject: [PATCH] make sure .mwcollection files cannot be shared --- core/src/main/groovy/com/muwire/core/files/HasherService.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/groovy/com/muwire/core/files/HasherService.groovy b/core/src/main/groovy/com/muwire/core/files/HasherService.groovy index 7f2d779e..43d0f3a5 100644 --- a/core/src/main/groovy/com/muwire/core/files/HasherService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/HasherService.groovy @@ -45,6 +45,8 @@ class HasherService { return if (canonical.isFile() && fileManager.negativeTree.fileToNode.containsKey(canonical)) return + if (canonical.getName().endsWith(".mwcollection")) + return if (canonical.getName().endsWith(".mwcomment")) { if (canonical.length() <= Constants.MAX_COMMENT_LENGTH) eventBus.publish(new SideCarFileEvent(file : canonical))