Files
hyperframes/packages/producer/src/services/servedPath.ts
T
Miguel Ángel a3fa250b25 fix(producer): a clip whose file name has a space or accent is mixed into the export once (#7747)
* fix(producer): a clip whose file name has a space or accent is mixed into the export once

* fix(producer): compare a clip's src decoded, keeping the authored spelling either way
2026-11-14 16:18:22 +00:00

15 lines
371 B
TypeScript

/** The project-relative path a render file server URL path names: each segment decoded, as the browser encoded it. */
export function servedPath(urlPath: string): string {
return urlPath
.replace(/^\//, "")
.split("/")
.map((seg) => {
try {
return decodeURIComponent(seg);
} catch {
return seg;
}
})
.join("/");
}