Closed tkokof closed 4 years ago
package.lua contains dir path check method:
function ide:IsSameDirectoryPath(s1, s2) return wx.wxFileName.DirName(s1):SameAs(wx.wxFileName.DirName(s2)) end
in some situations, ide:IsSameDirectoryPath can get nil params which will cause native error, seems a simple param checking can solve this ?
function ide:IsSameDirectoryPath(s1, s2) if s1 and s2 then return wx.wxFileName.DirName(s1):SameAs(wx.wxFileName.DirName(s2)) end return false end
@tkokof, thank you for the suggestion. I'll apply (a slightly different, but with the same functional effect) patch.
package.lua contains dir path check method:
function ide:IsSameDirectoryPath(s1, s2) return wx.wxFileName.DirName(s1):SameAs(wx.wxFileName.DirName(s2)) end
in some situations, ide:IsSameDirectoryPath can get nil params which will cause native error, seems a simple param checking can solve this ?
function ide:IsSameDirectoryPath(s1, s2) if s1 and s2 then return wx.wxFileName.DirName(s1):SameAs(wx.wxFileName.DirName(s2)) end return false end