Fix sidecar files larger than the limit from being shared

pull/24/head
Zlatin Balevsky 2019-11-02 11:15:08 +00:00
parent c154d9538d
commit 1c396711ed
1 changed files with 4 additions and 3 deletions

View File

@ -36,9 +36,10 @@ class HasherService {
return
if (canonical.isFile() && fileManager.negativeTree.fileToNode.containsKey(canonical))
return
if (canonical.getName().endsWith(".mwcomment") && canonical.length() <= Constants.MAX_COMMENT_LENGTH)
if (canonical.getName().endsWith(".mwcomment")) {
if (canonical.length() <= Constants.MAX_COMMENT_LENGTH)
eventBus.publish(new SideCarFileEvent(file : canonical))
else if (hashed.add(canonical))
} else if (hashed.add(canonical))
executor.execute( { -> process(canonical) } as Runnable)
}