diff -r dad2c8993342 -r 12958f987bcf file.cpp --- a/file.cpp Thu Dec 06 18:43:23 2007 +0000 +++ b/file.cpp Wed Jul 16 10:46:14 2008 +0000 @@ -354,8 +354,6 @@ // Set up members of the STARTUPINFO structure. ::ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) ); siStartInfo.cb = sizeof(STARTUPINFO); - siStartInfo.dwFlags = STARTF_USESHOWWINDOW; - siStartInfo.wShowWindow = SW_MINIMIZE; // Create command line. QString argv("unzip -o "); @@ -364,32 +362,26 @@ argv.append(QDir::convertSeparators(zipDir.path())); // Create the child process. - if (!::CreateProcess(NULL, - (LPWSTR) argv.unicode(), // command line - NULL, // process security attributes - NULL, // primary thread security attributes - TRUE, // handles are inherited - 0, // creation flags - NULL, // use parent's environment - NULL, // use parent's current directory - &siStartInfo, // STARTUPINFO pointer - &piProcInfo) ) // receives PROCESS_INFORMATION + if( !::CreateProcess(NULL, + (LPWSTR)argv.unicode(), // command line + NULL, // process security attributes + NULL, // primary thread security attributes + TRUE, // handles are inherited + 0, // creation flags + NULL, // use parent's environment + NULL, // use parent's current directory + &siStartInfo, // STARTUPINFO pointer + &piProcInfo) ) // receives PROCESS_INFORMATION { - QMessageBox::critical( 0, QObject::tr( "Critical Error" ), - QObject::tr("Couldn't start unzip to decompress data.")); err = aborted; } else { // Wait for it to finish. - ::WaitForSingleObject( piProcInfo.hProcess, INFINITE ); - - // Clean up handles. - CloseHandle(piProcInfo.hThread); - CloseHandle(piProcInfo.hProcess); + ::WaitForSingleObject( piProcInfo.hProcess, 10000 ); } #endif - return err; + return err; } bool loadStringFromDisk (const QString &fname, QString &s) @@ -503,3 +495,5 @@ if (imageFilters.at(i)==filter) return imageTypes.at(i); return QString(); } + +