Use better regex to match spaces

This commit is contained in:
Samuel Attard 2016-07-27 09:38:49 +10:00
parent 12dba2cb67
commit 9f0299cc31

View file

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