fix file not exists
This commit is contained in:
1 parent
4ac8a01c62
commit
d0262c021a
1 file changed
+2
-2
@@ -643,13 +643,13 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
|
|||||||
};
|
};
|
||||||
collect(data);
|
collect(data);
|
||||||
allFiles.forEach((file, key) => {
|
allFiles.forEach((file, key) => {
|
||||||
const modified = fs.statSync(file.path).mtimeMs;
|
|
||||||
b3util.files[key] = modified;
|
|
||||||
if (!file.exists) {
|
if (!file.exists) {
|
||||||
allFiles.delete(key);
|
allFiles.delete(key);
|
||||||
delete b3util.files[key];
|
delete b3util.files[key];
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
const modified = fs.statSync(file.path).mtimeMs;
|
||||||
|
b3util.files[key] = modified;
|
||||||
});
|
});
|
||||||
set({ allFiles });
|
set({ allFiles });
|
||||||
if (updated) {
|
if (updated) {
|
||||||
|
|||||||
Reference in new issue
Block a user