mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 07:37:10 +00:00
Fix root hashing due to missing root dirs
This commit is contained in:
@@ -33,9 +33,10 @@ export function ProjectCreation() {
|
||||
}
|
||||
}
|
||||
|
||||
const onCreate = useCallback(() => {
|
||||
const onCreate = useCallback(async () => {
|
||||
setCreating(true)
|
||||
const rootUri = `${PROJECTS_URI}${hexId()}/`
|
||||
await client.fs.mkdir(rootUri)
|
||||
createProject({ name, namespace, version, storage: { type: 'indexeddb', rootUri } })
|
||||
changeProject(name)
|
||||
if (file) {
|
||||
|
||||
@@ -32,7 +32,7 @@ export function ProjectPanel() {
|
||||
}
|
||||
service.watchTree(projectRoot, setEntries)
|
||||
client.fs.readdir(projectRoot).then(entries => {
|
||||
setEntries(entries.flatMap(e => e.name.startsWith(projectRoot) ? [e.name.slice(projectRoot.length)] : []))
|
||||
setEntries(entries.flatMap(e => e.isFile() && e.name.startsWith(projectRoot) ? [e.name.slice(projectRoot.length)] : []))
|
||||
})
|
||||
return () => service.unwatchTree(projectRoot, setEntries)
|
||||
}, [service, projectRoot])
|
||||
|
||||
Reference in New Issue
Block a user