`-MD` Does not escape paths with spaces
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 445
- Avg merge
- 11h 6m
- Merged PRs (30d)
- 6
Description
On Windows, the following invocation
```
glslc -MD "path\to\file with spaces.vert"
```
Writes to a `.d` file containing the contents
```
file with spaces.vert.spv: path\to\file with spaces.vert
```
This format cannot be parsed unambiguously, because the spaces may be either a space in one filename, or a separator between different filenames. The lefthand ambiguity can be resolved by assuming there is one file before `:`, but since multiple filenames can appear in the righthand expression there is no way to resolve that one.
By convention (not sure if specified anywhere), most compilers use the syntax
```
file\ with\ spaces.vert.spv: path\\to\\file\ with\ spaces.vert
```
where `\ ` is an escape sequence for ` `, and `\\` is an escape sequence for `\`. This resolves the ambiguity.
Contributor guide
Assessment
This issue has not been assessed yet.