Skip to content

Commit fa42cc1

Browse files
committed
fix: 修复配置文件中后缀不包含分隔符时导致解析出来的文件名称为lua.lua的问题
1 parent e3ac3d3 commit fa42cc1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Debugger/LuaPanda.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,11 @@ function this.changePotToSep(filePath, ext)
16991699
local idx = filePath:find(ext, (-1) * ext:len() , true)
17001700
if idx then
17011701
local tmp = filePath:sub(1, idx - 1):gsub("%.", "/");
1702+
-- 如果最后的后缀是/,代表luafileExtention不包含分隔符号,将其转换为.
1703+
if string.sub(tmp, -1) == "/" then
1704+
-- delete the last "/"
1705+
tmp = tmp:sub(1, -2) .. ".";
1706+
end
17021707
filePath = tmp .. ext;
17031708
end
17041709
return filePath;

0 commit comments

Comments
 (0)