Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.9.5, 5.12.0
Description
When quotes are used in paths arguments gets lost in certain cases, reproduced with 5.12.
From a customer:
"I think there's a bug in QCoreApplication::arguments() when dealing with quoted paths to the exe in Windows.
The attached exe prints the contents of QCoreApplication::arguments(). The output is as follows for various invocations of the program. As you can see, sometimes it splits the application path wrongly, and drops the last argument. Note: all these quotings of the application path are valid in Windows, and are executing the application.
D:\stuff\qtcmd>x64\Release\qtcmd.exe hello world
arg=x64\Release\qtcmd.exe
arg=hello
arg=world
D:\stuff\qtcmd>"x64\Release\"qtcmd.exe hello world
arg=x64\Release\
arg=qtcmd.exe
arg=hello
D:\stuff\qtcmd>"x64\Release"\qtcmd.exe hello world
arg=x64\Release
arg=\qtcmd.exe
arg=hello
D:\stuff\qtcmd>"x64\Release\qtcmd.exe" hello world
arg=x64\Release\qtcmd.exe
arg=hello
arg=world"