You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zig fmt rejects paths using forward slash instead of backslash on Windows #2668
Well, in the standard library of Zig it is mentioned that / is disallowed and since zig fmt is self-hosted and uses the std library it is not allowed. The following is said in the std/os/windows.zig:
I would argue that this goes against how most tools in windows operate, which is accepting both / and \ in the file path arguments. However, as long as the behavior Zig chooses is consistent, it doesn't really matter.
Activity
FireFox317 commentedon Jun 13, 2019
Well, in the standard library of Zig it is mentioned that
/is disallowed and sincezig fmtis self-hosted and uses the std library it is not allowed. The following is said in the std/os/windows.zig:Maybe we should also disallow
/in the rest of the compiler.ErikMcClure commentedon Jun 14, 2019
I would argue that this goes against how most tools in windows operate, which is accepting both
/and\in the file path arguments. However, as long as the behavior Zig chooses is consistent, it doesn't really matter.andrewrk commentedon Jun 14, 2019
I don't remember writing that comment, I'm going to audit this code
emekoi commentedon Jun 16, 2019
i'm pretty sure this is because zig isn't escaping the
\in the path name.BarabasGitHub commentedon Mar 28, 2020
Ehm... just convert
\to/? It already has to copy and convert to utf16 anyway.It has to be handled somewhere at least.
fix the build on Windows