After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696190 - MTP device problems with rename, delete , and copy from samba share
MTP device problems with rename, delete , and copy from samba share
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: mtp backend
1.15.x
Other Linux
: Normal normal
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on: 695984 696163
Blocks:
 
 
Reported: 2013-03-20 13:01 UTC by André Kjellstrup
Modified: 2013-03-30 23:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description André Kjellstrup 2013-03-20 13:01:37 UTC
Reproduce:
1.- Connect an MTP device, I used an android device. (Note II)
2.- use file manager to access the mounted device.

Bugs:
3.- observe that it is impossible to delete a file by pressing delete (key) , while using right-click and selecting "delete" works.
4.- observe that you are unable to overwrite a file, you'll get an duplicate with "wrong" extension instead.
5.- you cannot rename a file on MTP device.
6.- Finally, attempting to copy from a samba share (gvfs-smb mounted share), to a MTP device is not possible
Comment 1 Cosimo Cecchi 2013-03-20 19:43:45 UTC
-> gvfs

(In reply to comment #0)

> Bugs:
> 3.- observe that it is impossible to delete a file by pressing delete (key) ,
> while using right-click and selecting "delete" works.

That's probably because the backend doesn't support trashing, which is the Ctrl+Delete action (some distros might have patched that back to use Delete instead). Shift+Delete triggers the Delete action, and my guess is that will work too.

> 4.- observe that you are unable to overwrite a file, you'll get an duplicate
> with "wrong" extension instead.
> 5.- you cannot rename a file on MTP device.
> 6.- Finally, attempting to copy from a samba share (gvfs-smb mounted share), to
> a MTP device is not possible

These all sounds like bugs in the MTP backend and not specific to Nautilus, reassigning to gvfs.
Comment 2 Philip Langdale 2013-03-21 04:41:59 UTC
3. This works fine for me. I get a dialog saying that trash isn't usable and do I want to really really delete.

4. This works with the cumulative set of patches through bug 696163

5. Assuming the device supports renaming (it might not), this works.

6. This will work for devices with the Android direct i/o extensions and the patches in bug 695984. For devices without the google MTP stack, it simply isn't possible.
Comment 3 Philip Langdale 2013-03-21 04:47:09 UTC
Oh, you said you have a Note II, so I have bad news for you.

5. The Samsung stack doesn't support renaming

6. The Samsung stack doesn't include Google's direct i/o extensions.

Sorry.
Comment 4 André Kjellstrup 2013-03-21 07:15:22 UTC
WTF ? - why did samsung mess with MTP ? - would be fun if it could easily be replaced with the google version on a rooted device.
Comment 5 Philip Langdale 2013-03-21 16:19:33 UTC
Based on the capability report that mtp-detect returns, Samsung's motivation for writing their own MTP stack was WM-DRM support so you can copy all your awesome Zune tunes to your phone. I'm sure you're very grateful that Samsung did this for you :-)

I doubt it would be practical to replace the MTP service by itself, but you can obviously install CyanogenMod or another AOSP based distribution and then you'll have the Google stack.

----

You wanted more details on the delete thing?

Well, we can't support Trash on MTP devices for a couple of reasons:

1) As the devices don't understand the trash concept, you'd only be able to clear out the trash manually from a PC or using a file manager (if the device supports one). That's bad usability

2) It's only actually possible to move files into the trash efficiently if the device stack supports the Move method, and no devices have this - not even ones with the Google stack.

As for why the delete key doesn't work. At least for me (still running Ubuntu 12.10) when I hit delete, I get a dialog that explains trash doesn't work and do I want to delete the file for real (as I said above). Perhaps the newer Nautilus in 13.04 doesn't do this anymore and just silently ignores the key event - that seems inferior behaviour, and I'm not sure why they'd do that, but it is what it is.