Fix issue on Windows

This commit is contained in:
Alex Dima
2018-01-26 17:57:41 +01:00
parent 6225dcca12
commit a87eb4894a
2 changed files with 14 additions and 2 deletions

View File

@@ -31,6 +31,9 @@ function createAsar(folderPath, unpackGlobs, destFilename) {
return;
}
var lastSlash = dir.lastIndexOf('/');
if (lastSlash === -1) {
lastSlash = dir.lastIndexOf('\\');
}
if (lastSlash !== -1) {
insertDirectoryRecursive(dir.substring(0, lastSlash));
}
@@ -39,6 +42,9 @@ function createAsar(folderPath, unpackGlobs, destFilename) {
};
var insertDirectoryForFile = function (file) {
var lastSlash = file.lastIndexOf('/');
if (lastSlash === -1) {
lastSlash = file.lastIndexOf('\\');
}
if (lastSlash !== -1) {
insertDirectoryRecursive(file.substring(0, lastSlash));
}