Skip to content

Commit

Permalink
Merge pull request #2 from CodyJung/fujifilm
Browse files Browse the repository at this point in the history
Add fujifilm camera support
  • Loading branch information
ganeshrvel committed Nov 1, 2022
2 parents b7906e7 + de67de6 commit 27ccd6f
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit 27ccd6f

Please sign in to comment.