diff options
| author | Adam <[email protected]> | 2026-01-22 12:40:57 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-22 12:41:02 -0600 |
| commit | 46de1ed3b60c46d998a19e8a9979559d34a2765b (patch) | |
| tree | 27924ae0e57679b1ffb2a32d2bafb02786a14725 | |
| parent | 3c7d5174b3ec508c0301513dda75adc253c3e74f (diff) | |
| download | opencode-46de1ed3b60c46d998a19e8a9979559d34a2765b.tar.gz opencode-46de1ed3b60c46d998a19e8a9979559d34a2765b.zip | |
fix(app): windows path handling issues
| -rw-r--r-- | packages/util/src/path.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/util/src/path.ts b/packages/util/src/path.ts index 2da8028b4..1ac106f21 100644 --- a/packages/util/src/path.ts +++ b/packages/util/src/path.ts @@ -7,7 +7,8 @@ export function getFilename(path: string | undefined) { export function getDirectory(path: string | undefined) { if (!path) return "" - const parts = path.split("/") + const trimmed = path.replace(/[\/\\]+$/, "") + const parts = trimmed.split(/[\/\\]/) return parts.slice(0, parts.length - 1).join("/") + "/" } |
