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 753934 - Files are not marked as untrashable
Files are not marked as untrashable
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: daemon
git master
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on: 754167
Blocks:
 
 
Reported: 2015-08-21 14:54 UTC by Debarshi Ray
Modified: 2015-09-23 08:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dav: Mark files as untrashable (846 bytes, patch)
2015-08-21 14:55 UTC, Debarshi Ray
committed Details | Review
Mark files as untrashable for main backends (3.09 KB, patch)
2015-08-26 16:40 UTC, Ondrej Holy
accepted-commit_after_freeze Details | Review

Description Debarshi Ray 2015-08-21 14:54:15 UTC
Nautilus offers "Move to Trash" instead of "Delete Permanently" because G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH is not being set to TRUE.
Comment 1 Debarshi Ray 2015-08-21 14:55:33 UTC
Created attachment 309822 [details] [review]
dav: Mark files as untrashable
Comment 2 Ross Lagerwall 2015-08-25 06:24:32 UTC
Review of attachment 309822 [details] [review]:

Looks good!
Comment 3 Debarshi Ray 2015-08-25 09:16:25 UTC
Comment on attachment 309822 [details] [review]
dav: Mark files as untrashable

Pushed to gnome-3-16 and master.
Comment 4 Ondrej Holy 2015-08-25 15:11:39 UTC
Reopening because:

1/ "Move to Trash" is no more offered, but I don't see neither "Delete permanently" (nautilus-3.16.2-2.fc22.x86_64), so it is impossible to delete the files at all currently...

Is somewhere corresponding Nautilus bug?

2/ It seems the following backends need to be fixed also:
daemon/gvfsbackendafc.c
daemon/gvfsbackendafp.c
daemon/gvfsbackendftp.c
daemon/gvfsbackendsftp.c
daemon/gvfsbackendsmb.c

I can fix the second issue, but I would like to know, what's wrong with the first issue before...
Comment 5 Debarshi Ray 2015-08-25 15:22:12 UTC
(In reply to Ondrej Holy from comment #4)
> Reopening because:
> 
> 1/ "Move to Trash" is no more offered, but I don't see neither "Delete
> permanently" (nautilus-3.16.2-2.fc22.x86_64), so it is impossible to delete
> the files at all currently...

Oops. I was testing primarily with nautilus git master. I will double check with nautilus-3.16.x.
Comment 6 Ondrej Holy 2015-08-25 15:32:37 UTC
You are right, it works correctly with Nautilus master for me, so the Nautilus feature has to be backported, or the GVfs patch has to be reverted for gnome-3-16 branch...
Comment 7 Ondrej Holy 2015-08-25 16:03:16 UTC
(In reply to Ondrej Holy from comment #6)
> You are right, it works correctly with Nautilus master for me, so the
> Nautilus feature has to be backported, or the GVfs patch has to be reverted
> for gnome-3-16 branch...

I've forgotten that there are already backends with _CAN_TRASH set to FALSE, so we have to fix this in Nautilus...

nautilus-3.14.x works correctly for me, so this is bug in nautilus-3.16.x.
Comment 8 Debarshi Ray 2015-08-25 16:09:11 UTC
(In reply to Ondrej Holy from comment #7)
> (In reply to Ondrej Holy from comment #6)
> > You are right, it works correctly with Nautilus master for me, so the
> > Nautilus feature has to be backported, or the GVfs patch has to be reverted
> > for gnome-3-16 branch...
> 
> I've forgotten that there are already backends with _CAN_TRASH set to FALSE,
> so we have to fix this in Nautilus...
> 
> nautilus-3.14.x works correctly for me, so this is bug in nautilus-3.16.x.

Ok. So let's fix nautilus then. I will file a nautilus bug and try to write a patch for it.
Comment 9 Ondrej Holy 2015-08-25 16:18:14 UTC
Thanks, I will prepare patches for other backends...
Comment 10 Ondrej Holy 2015-08-26 16:40:34 UTC
Created attachment 310047 [details] [review]
Mark files as untrashable for main backends

Mark files as untrashable for backends listed in Comment 4. I've tested the change in ftp, sftp and smb backend. 

Still a few backends is missing (e.g. smb-browse, afp-browse), but not sure it is necessary here...
Comment 11 Ross Lagerwall 2015-09-20 14:20:50 UTC
Review of attachment 310047 [details] [review]:

Looks good.
Comment 12 Ondrej Holy 2015-09-23 08:20:21 UTC
Thanks for the review, pushed as commit 1a4e823 .