Skip to content

Commit

Permalink
bugfix:issue Tencent#150, 修复配置文件中后缀不包含分隔符时导致解析出来的文件名称为lua.lua的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang.cheng committed Mar 11, 2024
1 parent e3ac3d3 commit ecae038
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Debugger/LuaPanda.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,11 @@ function this.changePotToSep(filePath, ext)
local idx = filePath:find(ext, (-1) * ext:len() , true)
if idx then
local tmp = filePath:sub(1, idx - 1):gsub("%.", "/");
-- 如果最后的后缀是/,代表luafileExtention不包含分隔符号,将其转换为.
if string.sub(tmp, -1) == "/" then
-- delete the last "/"
tmp = tmp:sub(1, -2) .. "."
end
filePath = tmp .. ext;
end
return filePath;
Expand Down

0 comments on commit ecae038

Please sign in to comment.