mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-11 07:41:04 +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:
parent
178b3d4cd3
commit
63db115257
@ -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, '/')
|
||||
}
|
||||
|
2
linux.js
2
linux.js
@ -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)
|
||||
})
|
||||
|
2
win32.js
2
win32.js
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user