Watcher rewritten with inotify module, bugs fixed.

This commit is contained in:
Leo Vasanko
2023-10-19 23:52:37 +03:00
committed by Leo Vasanko
parent 228b75a20d
commit 9939cb33fa
4 changed files with 45 additions and 21 deletions

View File

@@ -54,9 +54,11 @@ function createWatchSocket() {
createWatchSocket()
function tree_update(msg) {
console.log("Tree update", msg)
let node = files
for (const elem of msg) {
if (elem.deleted) {
const p = node.dir[elem.name].path
delete node.dir[elem.name]
delete flatfiles[p]
break