[regression] Files fails to create thumbnails and open files on MTP

Bug #1402447 reported by Sergey "Shnatsel" Davidoff on 2014-12-14
This bug affects 6 people
Affects Status Importance Assigned to Milestone
In Progress
Jeremy Wootten

Bug Description

In Luna MTP devices were prefixed with "gphoto2://" and were properly thumbnailed; Shotwell could also open files from it. Or at least, that was the case for my Sailfish-powered phone.

In Freya, MTP paths look like "mtp://[usb:008,003]/Phone%20Memory/something.txt" and there are no thumbnails. Files also cannot be opened, neither in theoretically gvfs-supporting programs like Scratch nor via programs that only accept loca file names. They receive the path "/run/user/1000/gvfs/mtp:host=%5Busb%3A008%2C003%5D/Phone Memory/something.txt" but that doesn't seem to work either.

Files indicates that the size of any file on MTP device "0 bytes". It also cannot create new files via context menu entry, but it can create new folders. It's also able to copy files to and from MTP devices.

This does look a bit like a problem with GVFS in general (i.e. its MTP backend being lousy) and not with Files in particular, so I'm reporting it both against Files and the OS.

According to Wikipedia under a [citation needed], MTP requires copying the file to the host before opening it. So that would explain part of the weirdness.

Daniel Fore (danrabbit) on 2014-12-20
no longer affects: elementaryos
Changed in pantheon-files:
milestone: none → freya-rc1
Changed in pantheon-files:
importance: Undecided → Low
Jeremy Wootten (jeremywootten) wrote :

Has there been any improvement with this issue since rev 1733?

rahul ranjan (imrahulranjan) wrote :

This issue is still there. Upon click on any file , instead of opening it, Files treats it as a folder and displays Folder doesn't exists.

Jeremy Wootten (jeremywootten) wrote :

OK, thanks. The mentioned revision dealt with some issues with SMB files, but it was possible that handling of MTP files was also affected favourably. It is uncertain whether this will be fixed for rc1 now but we will look into it as soon as possible.

Changed in pantheon-files:
milestone: freya-rc1 → none
Jeremy Wootten (jeremywootten) wrote :

I can confirm that the inability to open or thumbnail files is a limitation of the gvfs-mtp backend. Creating new files on the MTP device also gives an "operation not supported" error although folders can be created. FIles and folders can be copied to and from an MTP device and deleted from it. It would be possible to simiulate creating a new file on the device by creating it locally in /tmp and copying it across but there wouldn't be much point as you couldn't operate on it in situ.

The linked branch does fix the "0 bytes" bug
Also displays the device name instead of a cryptic path in the path bar and tab.

It would seem sensible to hide options that gvfs does not support in the Files context menu.

Changed in pantheon-files:
status: New → In Progress
assignee: nobody → Jeremy Wootten (jeremywootten)
Changed in pantheon-files:
milestone: none → 0.2
Changed in pantheon-files:
status: In Progress → Confirmed
assignee: Jeremy Wootten (jeremywootten) → nobody
milestone: feature-future → loki-beta1
Cody Garver (codygarver) on 2016-03-14
Changed in pantheon-files:
milestone: loki-beta1 → loki+1-beta1
Cody Garver (codygarver) on 2017-02-26
Changed in pantheon-files:
assignee: nobody → Jeremy Wootten (jeremywootten)
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers