Skip to content

Commit

Permalink
Fix path separator replacement for ignore on Windows
Browse files Browse the repository at this point in the history
This needs to be done when Windows is the host OS regardless of
the target platform, not vice versa.

Fixes #79.
  • Loading branch information
kfranqueiro committed Jun 23, 2015
1 parent 178b3d4 commit 63db115
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ module.exports = {
}
},

userIgnoreFilter: function userIgnoreFilter (opts, is_win32, finalDir) {
userIgnoreFilter: function userIgnoreFilter (opts, finalDir) {
return function filter (file) {
if (is_win32) {
if (path.sep === '\\') {
// convert slashes so unix-format ignores work
file = file.replace(/\\/g, '/')
}
Expand Down
2 changes: 1 addition & 1 deletion linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
}

function copyUserApp () {
ncp(opts.dir, userAppDir, {filter: common.userIgnoreFilter(opts, false, finalDir), dereference: true}, function copied (err) {
ncp(opts.dir, userAppDir, {filter: common.userIgnoreFilter(opts, finalDir), dereference: true}, function copied (err) {
if (err) return cb(err)
common.prune(opts, userAppDir, cb, renameElectronBinary)
})
Expand Down
2 changes: 1 addition & 1 deletion win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function buildWinApp (opts, cb, newApp) {
}

// copy users app into destination path
ncp(opts.dir, paths.app, {filter: common.userIgnoreFilter(opts, true), dereference: true}, function copied (err) {
ncp(opts.dir, paths.app, {filter: common.userIgnoreFilter(opts), dereference: true}, function copied (err) {
if (err) return cb(err)

function moveApp () {
Expand Down

0 comments on commit 63db115

Please sign in to comment.