修复权限检测

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", "name": "dns-host",
"version": "1.2.0", "version": "1.2.1",
"description": "伪域名解析", "description": "伪域名解析",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

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

View File

@ -62,12 +62,8 @@ ipcMain.on('dns-host', (ev, conn) => {
break break
case 'check': case 'check':
try { var stat = fs.echo('', '/etc/hosts', true)
var stat = fs.echo('', '/etc/hosts', true) ev.returnValue = stat
ev.returnValue = true
} catch (e) {
ev.returnValue = false
}
break break
case 'history': case 'history':