Added windows path slash parsing

This commit is contained in:
Alexander Cerutti
2019-05-24 22:35:03 +02:00
parent 616abdaa04
commit 903192522c

View File

@@ -159,9 +159,13 @@ class Pass {
* if there's already a buffer of the same folder and called * if there's already a buffer of the same folder and called
* `pass.strings`, we'll merge the two buffers. We'll create * `pass.strings`, we'll merge the two buffers. We'll create
* it otherwise. * it otherwise.
*
* We are replacing the slashes to avoid Windows slashes
* composition.
*/ */
const stringFilePath = path.join(`${l}.lproj`, "pass.strings"); const stringFilePath = path.join(`${l}.lproj`, "pass.strings").replace(/\\/, "/");
const stringFileIndex = bundle.findIndex(file => file === stringFilePath); const stringFileIndex = bundle.findIndex(file => file === stringFilePath);
if (stringFileIndex > -1) { if (stringFileIndex > -1) {