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

Bug (?) in Device::FindFirst() #333

Closed
kirillnow opened this issue Jul 21, 2023 · 1 comment
Closed

Bug (?) in Device::FindFirst() #333

kirillnow opened this issue Jul 21, 2023 · 1 comment

Comments

@kirillnow
Copy link

Going by the code of this function, aft-mtp-mount should support filtering devices by "vendor:product".
Example: aft-mtp-mount -D 0e8d:2008 /tmp/mtp
It is a very useful feature for other script and apps.
But to do so, the following line
if (device && device->Matches(filter))
should be changed to
if (device && ((vendor >= 0 && product >= 0) || device->Matches(filter)))

@whoozle
Copy link
Owner

whoozle commented Jul 22, 2023

fixed in a9495bf
Thank you for reporting this!

@whoozle whoozle closed this as completed Jul 22, 2023
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

2 participants