diff --git a/Debugger/LuaPanda.lua b/Debugger/LuaPanda.lua index 23ce4de..ce6599b 100644 --- a/Debugger/LuaPanda.lua +++ b/Debugger/LuaPanda.lua @@ -902,7 +902,10 @@ function this.formatOpath(opath) if autoExt == nil or autoExt == '' then -- 在虚拟机返回路径没有后缀的情况下,用户必须自设后缀 -- 确定filePath中最后一个.xxx 不等于用户配置的后缀, 则把所有的. 转为 / - if not opath:find(luaFileExtension , (-1) * luaFileExtension:len(), true) then + if luaFileExtension == "" then + local tempPath = opath:match("(.-)%.") or opath; + opath = string.gsub(tempPath, "%.", "/"); + elseif not opath:find(luaFileExtension , (-1) * luaFileExtension:len(), true) then -- getinfo 路径没有后缀,把 . 全部替换成 / ,我们不允许用户在文件(或文件夹)名称中出现"." , 因为无法区分 opath = string.gsub(opath, "%.", "/"); else @@ -1746,7 +1749,10 @@ function this.getPath( info ) if autoExt == nil or autoExt == '' then -- 在虚拟机返回路径没有后缀的情况下,用户必须自设后缀 -- 确定filePath中最后一个.xxx 不等于用户配置的后缀, 则把所有的. 转为 / - if not filePath:find(luaFileExtension , (-1) * luaFileExtension:len(), true) then + if luaFileExtension == "" then + local tempPath = filePath:match("(.-)%.") or filePath; + filePath = string.gsub(tempPath, "%.", "/"); + elseif not filePath:find(luaFileExtension , (-1) * luaFileExtension:len(), true) then -- getinfo 路径没有后缀,把 . 全部替换成 / ,我们不允许用户在文件(或文件夹)名称中出现"." , 因为无法区分 filePath = string.gsub(filePath, "%.", "/"); else