WPD: Dumping filesystem metadata works

This commit is contained in:
Kovid Goyal 2012-08-19 14:28:38 +05:30
parent 585bea2c24
commit b601e7bc63
2 changed files with 1 additions and 2 deletions

View File

@ -209,9 +209,7 @@ static PyObject* bulk_get_filesystem(IPortableDevice *device, IPortableDevicePro
callback->thread_state = PyEval_SaveThread();
while (TRUE) {
Py_BEGIN_ALLOW_THREADS;
wait_result = MsgWaitForMultipleObjects(1, &(callback->complete), FALSE, 60000, QS_ALLEVENTS);
Py_END_ALLOW_THREADS;
if (wait_result == WAIT_OBJECT_0) {
break; // Event was signalled, bulk operation complete
} else if (wait_result == WAIT_OBJECT_0 + 1) { // Messages need to be dispatched

View File

@ -70,6 +70,7 @@ def main():
print ('Connected to:', dev.get_gui_name())
print ('Total space', dev.total_space())
print ('Free space', dev.free_space())
pprint.pprint(dev.dev.get_filesystem(dev._main_id))
finally:
dev.shutdown()