Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.5.3
-
None
Description
For some specific conditions QProcess::start/QProcess::startCommand does not execute script
Steps to reproduce:
1. Make directory with name with spaces for me it is D:/Test folder/
2. Copy attached Test.cmd into cretated folder
3. Run attached application
Actual result:
**
QProcess::QProcess(0x0) QProcess::start( "cmd.exe" , QList("/c", "D:/Test folder/Test.cmd", "--log-path", "D:/Jerald L. Manlapaz") , OpenMode( "ReadOnly|WriteOnly" ) ) Creating process program : [cmd.exe] args : cmd.exe /c "D:/Test folder/Test.cmd" --log-path "D:/Jerald L. Manlapaz" pass environment : no QProcessPrivate::startupNotification() Started QProcessPrivate::waitForFinished(30000) QProcessPrivate::bytesAvailableInChannel(2) == 98 QProcessPrivate::tryReadFromChannel(2), read 98 bytes from the process' output QProcessPrivate::bytesAvailableInChannel(1) == 0 QProcessPrivate::tryReadFromChannel(1), 0 bytes available QProcessPrivate::bytesAvailableInChannel(2) == 0 QProcessPrivate::tryReadFromChannel(2), 0 bytes available QProcessPrivate::processFinished() QProcessPrivate::processFinished(): process is dead Finished ""
Expected result:
**
QProcess::QProcess(0x0) QProcess::start( "cmd.exe" , QList("/c", "D:/Test folder/Test.cmd", "--log-path", "D:/Jerald L. Manlapaz") , OpenMode( "ReadOnly|WriteOnly" ) ) Creating process program : [cmd.exe] args : cmd.exe /c "D:/Test folder/Test.cmd" --log-path D:/Jerald L. Manlapaz pass environment : no QProcessPrivate::startupNotification() Started QProcessPrivate::waitForFinished(30000) QProcessPrivate::bytesAvailableInChannel(1) == 9 QProcessPrivate::tryReadFromChannel(1), read 9 bytes from the process' output QProcessPrivate::bytesAvailableInChannel(1) == 38 QProcessPrivate::tryReadFromChannel(1), read 38 bytes from the process' output QProcessPrivate::bytesAvailableInChannel(1) == 7 QProcessPrivate::tryReadFromChannel(1), read 7 bytes from the process' output QProcessPrivate::bytesAvailableInChannel(1) == 0 QProcessPrivate::tryReadFromChannel(1), 0 bytes available QProcessPrivate::bytesAvailableInChannel(2) == 0 QProcessPrivate::tryReadFromChannel(2), 0 bytes available QProcessPrivate::processFinished() QProcessPrivate::processFinished(): process is dead Finished "\"START\"\r\n\"Path to logs = D:/Jerald L. Manlapaz\"\r\n\"END\"\r\n"
Note:
Spaces somehow influence on execution, if remove spaces from path to Test.cmd or spaces from argument value D:/Jerald L. Manlapaz -> D:/JeraldL.Manlapaz it works fine as expected