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 878
    • Issues 878
    • 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
  • !1983

glocalvfs: Create a dummy file for g_file_new_for_path("")

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Philip Withnall requested to merge pwithnall/glib:2328-file-new-empty-path into master Mar 10, 2021
  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 3

"" is not a valid path (stat() on it returns ENOENT). Previously, a full GLocalFile was being created, which ended up resolving to $CWD, through path canonicalisation. That isn’t right.

Fix it by creating a GDummyFile instead, and adding a unit test.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Fixes: #2328 (closed)

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 2328-file-new-empty-path