This commit is contained in:
Kovid Goyal 2021-05-03 12:07:35 +05:30
parent 7ff4a1f52d
commit 889b5f556f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -278,7 +278,7 @@ bulk_get_filesystem(
return false;
}
bulk_properties_callback->AddRef();
bulk_properties_callback->AddRef();
while (!PyErr_Occurred()) {
DWORD wait_result = bulk_properties_callback->wait_for_messages();
if (wait_result == WAIT_OBJECT_0) {
@ -294,12 +294,12 @@ bulk_get_filesystem(
PyErr_SetString(WPDError, "An unknown error occurred (mutex abandoned)");
} else {
// The wait failed for some reason
const char buf[256] = {0};
_snprintf_s((char *const)buf, sizeof(buf) - 1, _TRUNCATE, "handle wait failed in bulk filesystem get at file: %s line: %d", __FILE__, __LINE__);
PyErr_SetExcFromWindowsErrWithFilename(WPDError, 0, buf);
const char buf[256] = {0};
_snprintf_s((char *const)buf, sizeof(buf) - 1, _TRUNCATE, "handle wait failed in bulk filesystem get at file: %s line: %d", __FILE__, __LINE__);
PyErr_SetExcFromWindowsErrWithFilename(WPDError, 0, buf);
}
}
bulk_properties_callback->end_processing();
bulk_properties_callback->end_processing();
if (PyErr_Occurred()) {
bulk_properties->Cancel(guid_context);
pump_waiting_messages();