fix(#2862): windows path replaces backslashes with forward slashes (#2903)

* Fix Winodws path issue by replacing backslashes with forward slashes

* Fix #2862 (handle all filename-related tasks)

* fix type mismatch

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
Zifan Zhu
2024-09-14 22:23:37 -04:00
committed by GitHub
parent bd4881660b
commit 45a93d9979
2 changed files with 10 additions and 9 deletions

View File

@@ -290,7 +290,7 @@ function M.escape_special_chars(path)
if path == nil then
return path
end
return M.is_windows and path:gsub("%(", "\\("):gsub("%)", "\\)") or path
return M.is_windows and path:gsub("\\", "/") or path
end
--- Create empty sub-tables if not present