fix file not exists

This commit is contained in:
codetypes committed 2025-03-19 18:18:29 +08:00
1 parent 4ac8a01c62
commit d0262c021a
1 file changed
+2 -2
+2 -2
View File
@@ -643,13 +643,13 @@ export const useWorkspace = create<WorkspaceStore>((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) {