From d0262c021ad9a1778068a2fb0f59cc8e9ab74dc4 Mon Sep 17 00:00:00 2001 From: codetypes Date: Wed, 19 Mar 2025 18:18:29 +0800 Subject: [PATCH] fix file not exists --- src/contexts/workspace-context.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contexts/workspace-context.ts b/src/contexts/workspace-context.ts index 6198503..61f11bf 100644 --- a/src/contexts/workspace-context.ts +++ b/src/contexts/workspace-context.ts @@ -643,13 +643,13 @@ export const useWorkspace = create((set, get) => ({ }; collect(data); allFiles.forEach((file, key) => { - const modified = fs.statSync(file.path).mtimeMs; - b3util.files[key] = modified; if (!file.exists) { allFiles.delete(key); delete b3util.files[key]; updated = true; } + const modified = fs.statSync(file.path).mtimeMs; + b3util.files[key] = modified; }); set({ allFiles }); if (updated) {