diff options
| author | AJ Ka <[email protected]> | 2026-01-08 19:47:15 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-08 17:47:15 -0600 |
| commit | faa848cfb13df4e435dc236fe895032ea6f26dde (patch) | |
| tree | 5bdd43c153dd7d0cbacc0c365825f6da1b0c48d3 /packages/util | |
| parent | 80772e5ac2c91514b9a6e30bf0b48a6a4c979ec8 (diff) | |
| download | opencode-faa848cfb13df4e435dc236fe895032ea6f26dde.tar.gz opencode-faa848cfb13df4e435dc236fe895032ea6f26dde.zip | |
Fix for #7229 Fix/project sidebar folder name (#7232)
Diffstat (limited to 'packages/util')
| -rw-r--r-- | packages/util/src/path.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/util/src/path.ts b/packages/util/src/path.ts index f7c46d4ef..2da8028b4 100644 --- a/packages/util/src/path.ts +++ b/packages/util/src/path.ts @@ -1,7 +1,7 @@ export function getFilename(path: string | undefined) { if (!path) return "" - const trimmed = path.replace(/[\/]+$/, "") - const parts = trimmed.split("/") + const trimmed = path.replace(/[\/\\]+$/, "") + const parts = trimmed.split(/[\/\\]/) return parts[parts.length - 1] ?? "" } |
