From f8c64fe75508ee406c861e3d8423a6844edde646 Mon Sep 17 00:00:00 2001 From: "C.T. Lin" Date: Tue, 2 Jun 2015 00:08:52 +0800 Subject: [PATCH] get rid of sourcedir in path for ignore filter matching --- linux.js | 2 ++ mac.js | 2 ++ win32.js | 1 + 3 files changed, 5 insertions(+) diff --git a/linux.js b/linux.js index 4fe048d..f9dd93b 100644 --- a/linux.js +++ b/linux.js @@ -61,6 +61,8 @@ module.exports = { } function userFilter (file) { + file = file.split(path.resolve(opts.dir))[1] + var ignore = opts.ignore || [] if (!Array.isArray(ignore)) ignore = [ignore] ignore = ignore.concat([finalDir]) diff --git a/mac.js b/mac.js index 26ab295..9559820 100644 --- a/mac.js +++ b/mac.js @@ -69,6 +69,8 @@ function buildMacApp (opts, cb, newApp) { fs.writeFileSync(paths.info2, plist.build(pl2)) function filter (file) { + file = file.split(path.resolve(opts.dir))[1] + var ignore = opts.ignore || [] if (!Array.isArray(ignore)) ignore = [ignore] for (var i = 0; i < ignore.length; i++) { diff --git a/win32.js b/win32.js index be3a5eb..58f4c46 100644 --- a/win32.js +++ b/win32.js @@ -51,6 +51,7 @@ function buildWinApp (opts, cb, newApp) { } function filter (file) { + file = file.split(path.resolve(opts.dir))[1] // convert slashes so unix-format ignores work file = file.replace(/\\/g, '/')