summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Munro <brian.alexander.munro@gmail.com>2017-01-11 15:47:09 +0200
committerBrian Munro <brian.alexander.munro@gmail.com>2017-01-11 15:47:09 +0200
commitc9766b6e1a5dc794f4f3dbd8d231537ef13b77a4 (patch)
treeeac7eeeab23d831a057b23276b8c1220fcf9ea8d /src
parent03328e9f553ee1e582a7f9702060de8620b80a64 (diff)
Fixes the error code 5/6 issues
Diffstat (limited to 'src')
-rw-r--r--src/organizercore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 142c9eba..55d3f494 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -1243,7 +1243,7 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode)
while (
res = ::MsgWaitForMultipleObjects(1, &handle, false, 500,
QS_KEY | QS_MOUSE),
- ((res != WAIT_FAILED) && (res != WAIT_OBJECT_0)) &&
+ ((res != WAIT_FAILED) || (res != WAIT_OBJECT_0)) &&
((m_UserInterface == nullptr) || !m_UserInterface->unlockClicked())) {
if (!::GetVFSProcessList(&numProcesses, processes)) {
@@ -1256,9 +1256,9 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode)
for (size_t i = 0; i < count; ++i) {
std::wstring processName = getProcessName(processes[i]);
if (!boost::starts_with(processName, L"ModOrganizer.exe")) {
- currentProcess = processes[i];
+ currentProcess = processes[i];
m_UserInterface->setProcessName(QString::fromStdWString(processName));
- processHandle = ::OpenProcess(SYNCHRONIZE, FALSE, currentProcess);
+ processHandle = ::OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, currentProcess);
found = true;
}
}