summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/filewatch.lua2
-rw-r--r--script/library.lua2
-rw-r--r--script/meta/bee/filesystem.lua2
-rw-r--r--test/crossfile/hover.lua2
-rw-r--r--test/full/projects.lua2
-rw-r--r--test/full/self.lua2
6 files changed, 6 insertions, 6 deletions
diff --git a/script/filewatch.lua b/script/filewatch.lua
index d4850ca1..6520afe6 100644
--- a/script/filewatch.lua
+++ b/script/filewatch.lua
@@ -13,7 +13,7 @@ local function isExists(filename)
if not suc or not exists then
return false
end
- if plat.OS ~= 'Windows' then
+ if plat.os ~= 'windows' then
return true
end
local res = fs.fullpath(path)
diff --git a/script/library.lua b/script/library.lua
index 4446797a..2e925e8d 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -365,7 +365,7 @@ local function loadSingle3rdConfig(libraryDir)
end
if cfg.files then
for i, filename in ipairs(cfg.files) do
- if plat.OS == 'Windows' then
+ if plat.os == 'windows' then
filename = filename:gsub('/', '\\')
else
filename = filename:gsub('\\', '/')
diff --git a/script/meta/bee/filesystem.lua b/script/meta/bee/filesystem.lua
index c4267b97..0c7e41a8 100644
--- a/script/meta/bee/filesystem.lua
+++ b/script/meta/bee/filesystem.lua
@@ -24,7 +24,7 @@ end
function fsPath:stem()
end
----@return fs.path
+---@return string
function fsPath:extension()
end
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index a18c714b..8acae6f5 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -95,7 +95,7 @@ TEST {
* [a.lua](file:///a.lua) (搜索路径: `?.lua`)]],
}
-if require 'bee.platform'.OS == 'Windows' then
+if require 'bee.platform'.os == 'windows' then
TEST {
{
path = 'Folder/a.lua',
diff --git a/test/full/projects.lua b/test/full/projects.lua
index 20ef6724..22b27443 100644
--- a/test/full/projects.lua
+++ b/test/full/projects.lua
@@ -23,7 +23,7 @@ local function doProjects(pathname)
print('基准诊断目录:', path)
fsu.scanDirectory(path, function (path)
- if path:extension():string() ~= '.lua' then
+ if path:extension() ~= '.lua' then
return
end
local uri = furi.encode(path:string())
diff --git a/test/full/self.lua b/test/full/self.lua
index d118e034..69da54a0 100644
--- a/test/full/self.lua
+++ b/test/full/self.lua
@@ -14,7 +14,7 @@ local uris = {}
files.reset()
fsu.scanDirectory(path, function (path)
- if path:extension():string() ~= '.lua' then
+ if path:extension() ~= '.lua' then
return
end
local uri = furi.encode(path:string())