From 59da705c96188d62863118c9ad105422d1a3a2cb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Apr 2021 13:25:24 +0530 Subject: [PATCH] ... --- src/calibre/devices/mtp/windows/content_enumeration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/mtp/windows/content_enumeration.cpp b/src/calibre/devices/mtp/windows/content_enumeration.cpp index 93d94c5e9a..78fee8c14d 100644 --- a/src/calibre/devices/mtp/windows/content_enumeration.cpp +++ b/src/calibre/devices/mtp/windows/content_enumeration.cpp @@ -542,7 +542,7 @@ wpd::get_file(IPortableDevice *device, const wchar_t *object_id, PyObject *dest, return NULL; } else if (SUCCEEDED(hr)) { 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)); if (!res) { return NULL; } if (callback != NULL) {