Skip to content

Commit 2d8b90a

Browse files
authored
feat(storage): ensure storage directory exists and handle paths correctly (anomalyco#771)
1 parent a2fa7ff commit 2d8b90a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/opencode/src/storage/storage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export namespace Storage {
3939

4040
const state = App.state("storage", async () => {
4141
const app = App.info()
42-
const dir = path.join(app.path.data, "storage")
42+
const dir = path.normalize(path.join(app.path.data, "storage"))
43+
await fs.mkdir(dir, { recursive: true })
4344
const migration = await Bun.file(path.join(dir, "migration"))
4445
.json()
4546
.then((x) => parseInt(x))

0 commit comments

Comments
 (0)