fix(app): sanitize workspace store filenames on Windows (#16703)
This commit is contained in:
parent
34328828ae
commit
f27ef595f6
3 changed files with 11 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ export function sessionPath(directory: string, sessionID?: string) {
|
|||
}
|
||||
|
||||
export function workspacePersistKey(directory: string, key: string) {
|
||||
const head = directory.slice(0, 12) || "workspace"
|
||||
const head = (directory.slice(0, 12) || "workspace").replace(/[^a-zA-Z0-9._-]/g, "-")
|
||||
const sum = checksum(directory) ?? "0"
|
||||
return `opencode.workspace.${head}.${sum}.dat:workspace:${key}`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue