Fix for #7229 Fix/project sidebar folder name (#7232)

This commit is contained in:
AJ Ka 2026-01-08 19:47:15 -04:00 committed by GitHub
parent 80772e5ac2
commit faa848cfb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 8 deletions

View file

@ -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] ?? ""
}