Backport !2185 “glocalfile: Fix the global trash dir detection” to glib-2-68
The g_file_trash
function fails with the Unable to find or create trash directory
error when the global .Trash
directory exists. This is because
the commit 7f2af262 introduced the gboolean success
variable to signalize
the detection of the trash folder, but didn't set it in all code branches.
Since for a time this variable was not initialized the bug wasn't visible
when the trash folder existed. The bug became effective after the success
variable was initialized with FALSE
by the commit c983ded0. Let's explicitly
set the success
variable in all branches to fix the global trash dir
detection.
Fixes: #2439 (closed)
Trivial backport of !2185 (merged).