summaryrefslogtreecommitdiff
path: root/script/plugin.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-30 17:47:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-30 17:47:49 +0800
commitfe3e9088bdbec0f2a46704bbab4f4f460a38992e (patch)
treea6fc9dcf0a8693d47a290b285d38e28c33aebc7b /script/plugin.lua
parentd15a62ec1f0957eb464c7f5c08e0b8bcad6bd487 (diff)
downloadlua-language-server-fe3e9088bdbec0f2a46704bbab4f4f460a38992e.zip
some fix
Diffstat (limited to 'script/plugin.lua')
-rw-r--r--script/plugin.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/plugin.lua b/script/plugin.lua
index e66e410f..392b92af 100644
--- a/script/plugin.lua
+++ b/script/plugin.lua
@@ -51,7 +51,8 @@ local function resetFiles()
end
local function checkTrustLoad()
- local trusted = util.loadFile(LOGPATH / 'trusted') or ''
+ local filePath = LOGPATH .. '/trusted'
+ local trusted = util.loadFile(filePath) or ''
local lines = {}
for line in util.eachLine(trusted) do
lines[#lines+1] = line
@@ -67,7 +68,7 @@ local function checkTrustLoad()
return false
end
lines[#lines+1] = m.pluginPath
- util.saveFile(LOGPATH / 'trusted', table.concat(trusted, '\n'))
+ util.saveFile(filePath, table.concat(lines, '\n'))
return true
end