修复权限检测

old
宇天 2020-06-01 15:38:52 +08:00
parent 6d17123b33
commit 51cf8ca399
3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "dns-host",
"version": "1.2.0",
"version": "1.2.1",
"description": "伪域名解析",
"main": "src/main.js",
"scripts": {

View File

@ -174,7 +174,7 @@ Anot({
}
}
this.domains = tmp
this.permissionShow = false
this.toggleDomain(Anot.ls('last_domain') || '')
} else {
this.permissionShow = true

View File

@ -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':