This commit is contained in:
Kovid Goyal 2021-04-23 13:25:24 +05:30
parent e36971f840
commit 59da705c96
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -542,7 +542,7 @@ wpd::get_file(IPortableDevice *device, const wchar_t *object_id, PyObject *dest,
return NULL; return NULL;
} else if (SUCCEEDED(hr)) { } else if (SUCCEEDED(hr)) {
if (bytes_read > 0) { if (bytes_read > 0) {
total_read = total_read + bytes_read; total_read += bytes_read;
pyobject_raii res(PyObject_CallMethod(dest, "write", "y#", buf.ptr(), bytes_read)); pyobject_raii res(PyObject_CallMethod(dest, "write", "y#", buf.ptr(), bytes_read));
if (!res) { return NULL; } if (!res) { return NULL; }
if (callback != NULL) { if (callback != NULL) {