summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-20 16:41:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-20 16:41:15 +0800
commit310fb6033315245681b620a317f9f21a9897ee00 (patch)
treedbd3a07be8446560e5c83fb194e03cf37e077505
parent5b5ffd799bf613c97fa65f83c50018bf942876b0 (diff)
downloadlua-language-server-310fb6033315245681b620a317f9f21a9897ee00.zip
only search real uri in Windows
-rw-r--r--script/files.lua3
-rw-r--r--script/filewatch.lua4
2 files changed, 7 insertions, 0 deletions
diff --git a/script/files.lua b/script/files.lua
index e645cd83..604afa99 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -73,6 +73,9 @@ end
---@param uri uri
---@return uri
function m.getRealUri(uri)
+ if platform.OS ~= 'Windows' then
+ return uri
+ end
local filename = furi.decode(uri)
-- normalize uri
uri = furi.encode(filename)
diff --git a/script/filewatch.lua b/script/filewatch.lua
index 66e8afb3..2b687dd2 100644
--- a/script/filewatch.lua
+++ b/script/filewatch.lua
@@ -1,5 +1,6 @@
local fw = require 'bee.filewatch'
local fs = require 'bee.filesystem'
+local plat = require 'bee.platform'
local await = require 'await'
local MODIFY = 1 << 0
@@ -11,6 +12,9 @@ local function isExists(filename)
if not suc or not exists then
return false
end
+ if plat.OS ~= 'Windows' then
+ return true
+ end
local suc, res = pcall(fs.fullpath, path)
if not suc then
return false