Skip to content

Commit fe3e908

Browse files
committed
some fix
1 parent d15a62e commit fe3e908

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

script/client.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function m.awaitRequestMessage(type, message, titles)
102102
map[title] = i
103103
end
104104
local item = proto.awaitRequest('window/showMessageRequest', {
105-
type = type,
105+
type = define.MessageType[type] or 3,
106106
message = message,
107107
actions = actions,
108108
})

script/plugin.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ local function resetFiles()
5151
end
5252

5353
local function checkTrustLoad()
54-
local trusted = util.loadFile(LOGPATH / 'trusted') or ''
54+
local filePath = LOGPATH .. '/trusted'
55+
local trusted = util.loadFile(filePath) or ''
5556
local lines = {}
5657
for line in util.eachLine(trusted) do
5758
lines[#lines+1] = line
@@ -67,7 +68,7 @@ local function checkTrustLoad()
6768
return false
6869
end
6970
lines[#lines+1] = m.pluginPath
70-
util.saveFile(LOGPATH / 'trusted', table.concat(trusted, '\n'))
71+
util.saveFile(filePath, table.concat(lines, '\n'))
7172
return true
7273
end
7374

0 commit comments

Comments
 (0)