Fix reload module problem on windows

This commit is contained in:
Francesco Abbate committed 2021-02-17 19:20:00 +01:00
1 parent 6369a7f760
commit 1ce1c114ba
3 files changed
+13 -2

No files matched your search

+10
View File
@@ -228,4 +228,14 @@ function common.home_expand(text)
end
function common.normalize_path(filename)
if PATHSEP == '\\' then
filename = filename:gsub('[/\\]', '\\')
local drive, rem = filename:match('^([a-zA-Z])(:.*)')
return drive and drive:upper() .. rem or filename
end
return filename
end
return common