slavapestov/factor — comment on commit 9876ebc79145fcddee31f4c471015e6024b56512
File: basis/io/launcher/windows/windows.factor line 63
By jckarter:

For completeness we should also handle backslashes before quotation marks. According to the msvcrt command line parsing rules, backslashes are literal unless they precede a quotation mark, in which case they must be doubled. Some test cases:

* the argument `\foo\\bar\\\bas\` should remain `\foo\bar\\\bas\`
* the argument `\"foo"\\bar\\\bas\` should be rendered `\\\"foo\"\\bar\\\bas\`
* the argument `\foo\\"bar"\\\bas\` should be rendered `\foo\\\\\"bar\"\\\bas\`
* the argument `\foo\\bar\\\"bas"\` should be rendered `\foo\\bar\\\\\\\"bas\"\`
* the argument `\foo\\bar bar\\\bas\` should be rendered `"\foo\\bar bar\\\bas\\"`