Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBMTP_Get_Filelisting_With_Callback() and LIBMTP_Get_Folder_List_For_Storage() can work only in Cached mode #129

Open
cher-nov opened this issue Oct 27, 2022 · 0 comments

Comments

@cher-nov
Copy link
Contributor

libmtp/src/libmtp.c

Lines 2885 to 2894 in e8480ba

static void flush_handles(LIBMTP_mtpdevice_t *device)
{
PTPParams *params = (PTPParams *) device->params;
PTP_USB *ptp_usb = (PTP_USB*) device->usbinfo;
int ret;
uint32_t i;
if (!device->cached) {
return;
}

This function is called by both functions mentioned in the title. But because of this block of code, the params->nrofobjects == 0 condition will remain true, so there never will be any objects made available in Uncached mode.

There are also other functions that suffer from this, which can be found by this line.

This should be either fixed or explicitly stated somewhere in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant