fix(client): file: prefix in fileName attribute

This commit is contained in:
teidesu 2021-08-02 14:46:12 +03:00
parent 852af9ffab
commit 37398d1080

View file

@ -99,7 +99,7 @@ export function svgPathToFile(path: string): Buffer {
)
}
const FILENAME_REGEX = /^(\/?.+[/\\])*(.+\..+)$/
const FILENAME_REGEX = /^(?:file:)?(\/?.+[/\\])*(.+\..+)$/
export function extractFileName(path: string): string {
const m = path.match(FILENAME_REGEX)