diff --git a/lib/package.js b/lib/package.js index a352fa3..2f446a9 100644 --- a/lib/package.js +++ b/lib/package.js @@ -113,7 +113,7 @@ const appdata = commonTools.appdata; if (options.excludefiles instanceof Array) { this.excludeFiles = options.excludefiles.map(filePath => { if (filePath && filePath.length) - filePath = filePath.replace(/(^\\|^)/i, "\\").replaceAll(/\\/gi, "\\\\"); + filePath = filePath.replace(/(^\\|^\/|^)/i, path.sep).replaceAll(/\\/gi, "\\\\"); return filePath; }); } else {