diff --git a/package.json b/package.json index 01d5a52..d8fdcf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dns-host", - "version": "1.2.0", + "version": "1.2.1", "description": "伪域名解析", "main": "src/main.js", "scripts": { diff --git a/src/js/app.js b/src/js/app.js index 7273320..f1ab911 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -174,7 +174,7 @@ Anot({ } } this.domains = tmp - + this.permissionShow = false this.toggleDomain(Anot.ls('last_domain') || '') } else { this.permissionShow = true diff --git a/src/tools/init.js b/src/tools/init.js index 5531533..0b70d9e 100644 --- a/src/tools/init.js +++ b/src/tools/init.js @@ -62,12 +62,8 @@ ipcMain.on('dns-host', (ev, conn) => { break case 'check': - try { - var stat = fs.echo('', '/etc/hosts', true) - ev.returnValue = true - } catch (e) { - ev.returnValue = false - } + var stat = fs.echo('', '/etc/hosts', true) + ev.returnValue = stat break case 'history':