Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 877
    • Issues 877
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • GLib
  • Merge requests
  • !2186

Backport !2185 “glocalfile: Fix the global trash dir detection” to glib-2-68

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Philip Withnall requested to merge pwithnall/glib:backport-2185-trash-fix-glib-2-68 into glib-2-68 Jul 12, 2021
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

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).

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: backport-2185-trash-fix-glib-2-68