Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
fix(electron): patch asar to normalize win32 paths
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Dec 1, 2018
1 parent b632294 commit cc9f65d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 16 additions & 0 deletions patches/asar+0.14.5.patch
Original file line number Diff line number Diff line change
@@ -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 = []
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14089,7 +14089,7 @@ moment-timezone@^0.5.13:
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=
Expand Down

0 comments on commit cc9f65d

Please sign in to comment.