Re:Go command support for embedded static assets (files)
by leetrout on Friday July 24, 2020 @10:42AM
(#23940085)
Oh, TIL! Well that is good to know- so it is only that windows backslashes fail on linux.
Re:Go command support for embedded static assets (files)
by josefx on Friday July 24, 2020 @11:59AM
(#23941037)
Windows path handling is a horrid mess. It basically takes your input and tries to turn it into a valid NT file path, that also includes handling special device names like COM1. At some point this was limited to 256 chars, so you had to input a valid NT path yourself if you wanted it longer, however I think Microsoft removed that limit a few years ago.
[1]: "Most" because they don't work for namespaced paths, by design. But note that the number of times you'll encounter those is limited, the Rust standard library doesn't handle them correctly in general, and a lot of other non-Rust software breaks when given them.