temp foreign char regex

This commit is contained in:
SpikeHD 2022-05-07 20:56:44 -07:00
parent b9a77ab8f1
commit fecd82fe75
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ async function openGrasscutterFolder() {
// https://www.jimzhao.us/2015/09/javascript-detect-chinese-character.html // https://www.jimzhao.us/2015/09/javascript-detect-chinese-character.html
function hasForeignChars(str) { function hasForeignChars(str) {
let re1 = /^[\x00-\x7F]+$/g let re1 = /^[A-Za-z\d,.?;:\\/'"!$%() ]*/g
str = str.replace(/\s/g, '') str = str.replace(/\s/g, '')
debug.log('Checking for foreign chars in path: ', str) debug.log('Checking for foreign chars in path: ', str)

View File

@ -528,7 +528,7 @@ async function setGrasscutterFolder() {
async function launchOfficial() { async function launchOfficial() {
const config = await getCfg() const config = await getCfg()
debug.log('Launching game') debug.log('Launching game at ' + config.gameexe)
Neutralino.os.execCommand(`"${config.gameexe}"`) Neutralino.os.execCommand(`"${config.gameexe}"`)
} }