diff --git a/openide.filesystems/src/org/openide/filesystems/DeepListener.java b/openide.filesystems/src/org/openide/filesystems/DeepListener.java --- a/openide.filesystems/src/org/openide/filesystems/DeepListener.java +++ b/openide.filesystems/src/org/openide/filesystems/DeepListener.java @@ -82,13 +82,14 @@ } @Override - public void run() { - FileObject fo = FileUtil.toFileObject(path); - if (fo != null) { - fo.removeRecursiveListener(this); + public synchronized void run() { + if (watching != null) { + watching.removeRecursiveListener(this); + watching = null; } removed = true; keep.remove(this); + } private synchronized void relisten() {