Skip to content
Permalink
Browse files

fix(electron): patch asar to normalize win32 paths

  • Loading branch information...
devinus committed Dec 1, 2018
1 parent b632294 commit cc9f65dbce7f26a2c7accd0d8271552345510756
Showing with 17 additions and 2 deletions.
  1. +0 −1 package.json
  2. +16 −0 patches/asar+0.14.5.patch
  3. +1 −1 yarn.lock
@@ -252,7 +252,6 @@
"lint-staged": "^8.1.0",
"liquid-fire": "^0.29.5",
"loader.js": "^4.7.0",
"moment": "^2.22.2",
"node-notifier-cli": "^1.1.2",
"nodemon": "^1.18.7",
"npm-run-all": "^4.1.5",
@@ -0,0 +1,16 @@
diff --git a/node_modules/asar/lib/asar.js b/node_modules/asar/lib/asar.js
index 8b98115..b5431b4 100644
--- a/node_modules/asar/lib/asar.js
+++ b/node_modules/asar/lib/asar.js
@@ -63,6 +63,11 @@ callback: The callback function. Accepts (err).
module.exports.createPackageFromFiles = function (src, dest, filenames, metadata, options, callback) {
if (typeof metadata === 'undefined' || metadata === null) { metadata = {} }
if (typeof options === 'undefined' || options === null) { options = {} }
+
+ src = path.normalize(src)
+ dest = path.normalize(dest)
+ filenames = filenames.map(function (filename) { return path.normalize(filename) })
+
const filesystem = new Filesystem(src)
const files = []
const unpackDirs = []
dependencies:
moment ">= 2.9.0"

"moment@>= 2.9.0", moment@^2.19.3, moment@^2.22.2:
"moment@>= 2.9.0", moment@^2.19.3:
version "2.22.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=

0 comments on commit cc9f65d

Please sign in to comment.
You can’t perform that action at this time.