summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2015-01-16 22:21:02 +1100
committerJames Ross-Gowan <rossymiles@gmail.com>2015-01-16 22:39:55 +1100
commit42fa954849da670f56043766d1a17a9f36ceb94f (patch)
treef04e5aeff76c75f659ae129dfebca06c19a13e1d /player
parent0092ae8676648a925ea66cbb5e2930fbb1f64dfc (diff)
downloadmpv-42fa954849da670f56043766d1a17a9f36ceb94f.tar.bz2
mpv-42fa954849da670f56043766d1a17a9f36ceb94f.tar.xz
subprocess-win: Always quote argv[0]
If the program name isn't quoted and the .exe it refers to isn't found, CreateProcess will add the program arguments to the program name and continue searching, so for "program arg1 arg2", CreateProcess would try "program.exe", "program arg1.exe", then "program arg1 arg2.exe". This behaviour is weird and not really desirable, so prevent it by always quoting the program name. When quoting argv[0], escape sequences shouldn't be used. msvcrt, .NET and CommandLineToArgvW all treat argv[0] literally and end it on the trailing quote, without processing escape sequences.
Diffstat (limited to 'player')
0 files changed, 0 insertions, 0 deletions