Extend // workaround to Windows

This commit is contained in:
Christopher Monsanto 2020-09-13 23:03:27 -04:00
parent 560f0ebf18
commit dec655d1c1

View File

@ -29,11 +29,12 @@ end
--
-- Workaround weird bug pre reported, where final path segment has two //
-- EDIT: AND workaround a bug Marty reported on Windows, where final path segment has a /\
local old_tup_glob = tup.glob
function tup.glob(pat)
local results = old_tup_glob(pat)
for i = 1, #results do
results[i] = results[i]:gsub("//", "/")
results[i] = results[i]:gsub("/\\", "/"):gsub("//", "/")
end
return results
end