summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRami Chowdhury <[email protected]>2025-07-08 16:34:11 -0400
committerGitHub <[email protected]>2025-07-08 15:34:11 -0500
commit2d8b90a6ff797fa42462122505c1d6f8ee29c70a (patch)
tree602e256d3f16082c53e9585416fbe6dfa12c8f90
parenta2fa7ffa425beeaef7999d7946e96ba0b5607f49 (diff)
downloadopencode-2d8b90a6ff797fa42462122505c1d6f8ee29c70a.tar.gz
opencode-2d8b90a6ff797fa42462122505c1d6f8ee29c70a.zip
feat(storage): ensure storage directory exists and handle paths correctly (#771)
-rw-r--r--packages/opencode/src/storage/storage.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/opencode/src/storage/storage.ts b/packages/opencode/src/storage/storage.ts
index 7093fb252..001eee0a1 100644
--- a/packages/opencode/src/storage/storage.ts
+++ b/packages/opencode/src/storage/storage.ts
@@ -39,7 +39,8 @@ export namespace Storage {
const state = App.state("storage", async () => {
const app = App.info()
- const dir = path.join(app.path.data, "storage")
+ const dir = path.normalize(path.join(app.path.data, "storage"))
+ await fs.mkdir(dir, { recursive: true })
const migration = await Bun.file(path.join(dir, "migration"))
.json()
.then((x) => parseInt(x))