fix(app): windows path handling issues

pull/10092/head
Adam 2026-01-22 12:40:57 -06:00
parent 3c7d5174b3
commit 46de1ed3b6
No known key found for this signature in database
GPG Key ID: 9CB48779AF150E75
1 changed files with 2 additions and 1 deletions

View File

@ -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("/") + "/"
}