2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-04 20:38:03 +00:00

Fix path separator replacement for ignore on Windows

This needs to be done when Windows is the host OS regardless of
the target platform, not vice versa.

Fixes #79.
This commit is contained in:
Kenneth G. Franqueiro 2015-06-22 21:22:12 -04:00
parent 178b3d4cd3
commit 63db115257
3 changed files with 4 additions and 4 deletions

View File

@ -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, '/')
}

View File

@ -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)
})

View File

@ -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 () {