diff options
Diffstat (limited to 'packages/util/src/path.ts')
| -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] ?? "" } |
