diff --git a/core/src/main/groovy/com/muwire/core/files/FileManager.groovy b/core/src/main/groovy/com/muwire/core/files/FileManager.groovy index 0c1297ef..74f75d74 100644 --- a/core/src/main/groovy/com/muwire/core/files/FileManager.groovy +++ b/core/src/main/groovy/com/muwire/core/files/FileManager.groovy @@ -104,12 +104,13 @@ class FileManager { String comment = sf.getComment() if (comment != null) { - index.remove(comment) Set existingComment = commentToFile.get(comment) if (existingComment != null) { existingComment.remove(sf.getFile()) - if (existingComment.isEmpty()) + if (existingComment.isEmpty()) { commentToFile.remove(comment) + index.remove(comment) + } } }