mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
Fix filename slashes (#880)
* Fix windows filename slashes * add comment * readXml will already convert the slashes
This commit is contained in:
parent
0fc4aacbbc
commit
bae6a56458
1 changed files with 6 additions and 1 deletions
|
|
@ -9,9 +9,14 @@ export function isPromise(obj) {
|
|||
return obj && typeof obj.then === "function";
|
||||
}
|
||||
|
||||
// Convert windows filename slashes to forward slashes
|
||||
function fixFilenameSlashes(filename) {
|
||||
return filename.replace(/\\/g, "/");
|
||||
}
|
||||
|
||||
export function getCaseInsensitveFile(zip, filename) {
|
||||
// TODO: Escape `file` for rejex characters
|
||||
return zip.file(new RegExp(filename, "i"))[0];
|
||||
return zip.file(new RegExp(fixFilenameSlashes(filename), "i"))[0];
|
||||
}
|
||||
|
||||
// Read a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue