From 9b2669a8b8bc024b9021b78950bc497fa02765a6 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Fri, 6 Dec 2019 10:51:35 +0000 Subject: [PATCH] update to new api --- .../main/groovy/com/muwire/core/files/FileManager.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 4d24a0cb..3b86392b 100644 --- a/core/src/main/groovy/com/muwire/core/files/FileManager.groovy +++ b/core/src/main/groovy/com/muwire/core/files/FileManager.groovy @@ -24,7 +24,7 @@ class FileManager { final Map> nameToFiles = new HashMap<>() final Map> commentToFile = new HashMap<>() final SearchIndex index = new SearchIndex() - final FileTree negativeTree = new FileTree() + final FileTree negativeTree = new FileTree<>() final Set sideCarFiles = new HashSet<>() FileManager(EventBus eventBus, MuWireSettings settings) { @@ -32,7 +32,7 @@ class FileManager { this.eventBus = eventBus for (String negative : settings.negativeFileTree) { - negativeTree.add(new File(negative)) + negativeTree.add(new File(negative), null) } } @@ -88,7 +88,7 @@ class FileManager { negativeTree.remove(sf.file) String parent = sf.getFile().getParent() if (parent != null && settings.watchedDirectories.contains(parent)) { - negativeTree.add(sf.file.getParentFile()) + negativeTree.add(sf.file.getParentFile(),null) } saveNegativeTree() @@ -128,7 +128,7 @@ class FileManager { fileToSharedFile.remove(sf.file) if (!e.deleted && negativeTree.fileToNode.containsKey(sf.file.getParentFile())) { - negativeTree.add(sf.file) + negativeTree.add(sf.file,null) saveNegativeTree() }