mirror of https://github.com/zlatinb/muwire
only remove from index if no more files have the same comment pt.2
parent
942de287c6
commit
d4c08f4fe6
|
@ -104,12 +104,13 @@ class FileManager {
|
||||||
|
|
||||||
String comment = sf.getComment()
|
String comment = sf.getComment()
|
||||||
if (comment != null) {
|
if (comment != null) {
|
||||||
index.remove(comment)
|
|
||||||
Set<File> existingComment = commentToFile.get(comment)
|
Set<File> existingComment = commentToFile.get(comment)
|
||||||
if (existingComment != null) {
|
if (existingComment != null) {
|
||||||
existingComment.remove(sf.getFile())
|
existingComment.remove(sf.getFile())
|
||||||
if (existingComment.isEmpty())
|
if (existingComment.isEmpty()) {
|
||||||
commentToFile.remove(comment)
|
commentToFile.remove(comment)
|
||||||
|
index.remove(comment)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue