the filetree map gets accessed from the directory watcher thread

pull/24/head
Zlatin Balevsky 2019-10-27 09:54:16 +00:00
parent 7a6365f87a
commit 2bb9480137
1 changed files with 3 additions and 1 deletions

View File

@ -1,9 +1,11 @@
package com.muwire.core.files
import java.util.concurrent.ConcurrentHashMap
class FileTree {
private final TreeNode root = new TreeNode()
private final Map<File, TreeNode> fileToNode = new HashMap<>()
private final Map<File, TreeNode> fileToNode = new ConcurrentHashMap<>()
void add(File file) {
List<File> path = new ArrayList<>()