diff --git a/lib/browser/init.js b/lib/browser/init.js index 37d1f4bb6360..88377a6978bb 100644 --- a/lib/browser/init.js +++ b/lib/browser/init.js @@ -93,8 +93,8 @@ if (process.platform === 'win32') { if (fs.statSyncNoException(updateDotExe)) { var packageDir = path.dirname(path.resolve(updateDotExe)) - var packageName = path.basename(packageDir).replace(/ /g, '') - var exeName = path.basename(process.execPath).replace(/\.exe$/i, '').replace(/ /g, '') + var packageName = path.basename(packageDir).replace(/\s/g, '') + var exeName = path.basename(process.execPath).replace(/\.exe$/i, '').replace(/\s/g, '') app.setAppUserModelId(`com.squirrel.${packageName}.${exeName}`) }