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 687202 - If trashing fails, the ".trashinfo" file is not removed
If trashing fails, the ".trashinfo" file is not removed
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-10-30 14:36 UTC by Jean-Philippe Fleury
Modified: 2013-10-31 04:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gio: Clean up trashinfo file if trashing fails (675 bytes, patch)
2013-10-30 18:37 UTC, Ross Lagerwall
accepted-commit_now Details | Review

Description Jean-Philippe Fleury 2012-10-30 14:36:25 UTC
Steps with Thunar:

1) Create a directory that will not have permissions to be deleted:

mkdir -m 500 directory-test

2) Open Thunar, right-click on "directory-test" and choose to delete it. An error will occur because of insufficient permissions.

Actual result: an empty information file "/home/user/.local/share/Trash/info/directory-test.trashinfo" remains.

Expected result: the information file should be deleted.

More information: previously reported for Thunar:

https://bugzilla.xfce.org/show_bug.cgi?id=8614

but closed with he following message:

> GIO issue, because thunar is not aware of the info file,
> it only calls g_file_trash and displays the error on failure.
> 
> Report upstream.
Comment 1 Ross Lagerwall 2013-10-30 18:36:40 UTC
This problem is actually in glib/gio since this happens when trashing a local directory/file.
Comment 2 Ross Lagerwall 2013-10-30 18:37:19 UTC
Created attachment 258606 [details] [review]
gio: Clean up trashinfo file if trashing fails
Comment 3 Colin Walters 2013-10-30 20:21:07 UTC
Review of attachment 258606 [details] [review]:

Looks like we're still leaving around the info/ and files/ directories, but eh, whatever.  Looks good!
Comment 4 Ross Lagerwall 2013-10-31 04:41:47 UTC
Pushed to master a e2fcb77.


(In reply to comment #3)
> Review of attachment 258606 [details] [review]:
> 
> Looks like we're still leaving around the info/ and files/ directories, but eh,
> whatever.  Looks good!

I don't really think that's a problem since they're part of the trash format and there are likely to be other files in the trash anyway.