diff --git a/plugins/c9.ide.tree/tree.js b/plugins/c9.ide.tree/tree.js index 7220e7e9..8a1a4b6e 100644 --- a/plugins/c9.ide.tree/tree.js +++ b/plugins/c9.ide.tree/tree.js @@ -414,7 +414,7 @@ define(function(require, exports, module) { // watch children var substr = id[id.length - 1] !== "/" ? id + "/" : id; Object.keys(expandedList).forEach(function(path) { - if (path.lastIndexOf(substr, 0) === 0) { + if (path.startsWith(substr) && path.indexOf("/", substr.length) == -1) { watcher.watch(path, refresh); } });