summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucas Grzegorczyk <[email protected]>2025-06-23 20:31:51 +0200
committerGitHub <[email protected]>2025-06-23 14:31:51 -0400
commited1b0d97bf340156efc2ef13be445426d7d9ef7c (patch)
treef001170bd44a6749a8b3507ed0c07ba9d08018aa
parent8d3b2fb8215b6b6b7b6a433cfba7e74bf0de93d1 (diff)
downloadopencode-ed1b0d97bf340156efc2ef13be445426d7d9ef7c.tar.gz
opencode-ed1b0d97bf340156efc2ef13be445426d7d9ef7c.zip
Fix project folder name starting with "-" in data (#323). Note old session data will still be in the old format in `~/.local/share/opencode/projects` - you can remove the leading dash to recover the,
-rw-r--r--packages/opencode/src/app/app.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/app/app.ts b/packages/opencode/src/app/app.ts
index 0e25de223..ac4423594 100644
--- a/packages/opencode/src/app/app.ts
+++ b/packages/opencode/src/app/app.ts
@@ -46,7 +46,7 @@ export namespace App {
const data = path.join(
Global.Path.data,
"project",
- git ? git.split(path.sep).join("-") : "global",
+ git ? git.split(path.sep).filter(Boolean).join("-") : "global",
)
const stateFile = Bun.file(path.join(data, APP_JSON))
const state = (await stateFile.json().catch(() => ({}))) as {