diff options
Diffstat (limited to 'packages/app')
| -rw-r--r-- | packages/app/src/context/file.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/app/src/context/file.tsx b/packages/app/src/context/file.tsx index 306bce922..805936cd8 100644 --- a/packages/app/src/context/file.tsx +++ b/packages/app/src/context/file.tsx @@ -571,6 +571,18 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({ } const kind = event.properties.event + if (kind === "change") { + const dir = (() => { + if (path === "") return "" + const node = tree.node[path] + if (node?.type !== "directory") return + return path + })() + if (dir === undefined) return + if (!tree.dir[dir]?.loaded) return + listDir(dir, { force: true }) + return + } if (kind !== "add" && kind !== "unlink") return const parent = path.split("/").slice(0, -1).join("/") |
