From 88b99fa86b6e828590f37b90b52044f35615ac45 Mon Sep 17 00:00:00 2001 From: Rizky Date: Fri, 16 Aug 2024 12:34:59 +0700 Subject: [PATCH] fix --- app/srv/ws/sync/code/parts/watcher.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/srv/ws/sync/code/parts/watcher.ts b/app/srv/ws/sync/code/parts/watcher.ts index 665de4a6..00d01158 100644 --- a/app/srv/ws/sync/code/parts/watcher.ts +++ b/app/srv/ws/sync/code/parts/watcher.ts @@ -66,9 +66,10 @@ export class Watcher { const files = await readdir(path); for (const file of files) { if (file.startsWith(".") || file === "node_modules") continue; - const stats = statSync(file); + const fullpath = join(path, file); + const stats = statSync(fullpath); if (stats.isDirectory()) { - this.watchers[file] = createWatcher(join(path, file), true); + this.watchers[file] = createWatcher(fullpath, true); } } } catch (e) {