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

Add fujifilm camera support #2

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mtp/mtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@ func (d *Device) Open() error {
d.claim()

if d.ifaceDescr.InterfaceStringIndex == 0 {
// Some of the win8phones have no interface field.
// Some devices have no interface field, so we'll hardcode ones
// that we know about. If this list gets too unwieldy, we may
// need to look into a more generic solution.
info := DeviceInfo{}
d.GetDeviceInfo(&info)

if !strings.Contains(info.MTPExtension, "microsoft/WindowsPhone") {
if !strings.Contains(info.MTPExtension, "microsoft/WindowsPhone") &&
!strings.Contains(info.MTPExtension, "fujifilm.co.jp") {
d.Close()
return fmt.Errorf("mtp: no MTP extensions in %s", info.MTPExtension)
}
Expand Down