Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop naively replacing
\
with /
in file paths for error msgs
As demonstrated in kaitai-io/kaitai_struct#507 (comment), this could in fact change the path incorrectly: on a Unix system, a file name can contain `\` as a special character, for example `hello\world.ksy`, but the old code would still "normalize" a Unix path like `./hello\world.ksy` to `./hello/world.ksy`, which is wrong. But I don't see why forced path normalization should be done on Windows either, except for purity reasons (which are unimportant if you ask me). I don't mind any mix of `\` and `/` slashes in the path coming out on Windows (which can indeed happen from now on, especially for paths to imported specs), as long as the resulting path points to the correct file (which it kind of has to, because it is the same path that the compiler used to access the file). This commit reverts 2aef0de.
- Loading branch information