Skip to content

Commit 1422d97

Browse files
committed
fix warning
1 parent 8442850 commit 1422d97

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

script/files.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ local function getRealParent(path)
7070
return path
7171
end
7272
local res = sys.fullpath(path)
73+
if not res then
74+
return path
75+
end
7376
return getRealParent(parent) / res:filename()
7477
end
7578

script/fs-utility.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,11 @@ function m.fileList(option)
571571
local keyMap = {}
572572
local fileList = {}
573573
local function computeKey(path)
574-
path = fsAbsolute(path, option)
575-
if not path then
574+
local abpath = fsAbsolute(path, option)
575+
if not abpath then
576576
return nil
577577
end
578-
return path:string()
578+
return abpath:string()
579579
end
580580
return setmetatable({}, {
581581
__index = function (_, path)

0 commit comments

Comments
 (0)