Menu

#1 Incorrect parsing of commandline

open
nobody
None
5
2007-10-08
2007-10-08
Anonymous
No

Commandlines like

"C:\path with space\program.exe" -k "text with space"

are parsed incorrectly.

The crulpit is in CommandLineParser.trimOffApplicationName. Changing the regex from

@"^(?<commandLine>("".+""|(\S)+))(?<remainder>.+)"

to

@"^(?<commandLine>(""(^"")+""|(\S)+))(?<remainder>.+)"

solves this problem.

Discussion


Log in to post a comment.