1. 19 Jun, 2018 1 commit
  2. 14 Jun, 2018 1 commit
  3. 05 May, 2018 1 commit
  4. 11 Apr, 2018 1 commit
  5. 16 Feb, 2018 2 commits
  6. 15 Jan, 2018 1 commit
    • Colin Walters's avatar
      GFile: Add g_file_peek_path() · 4808a957
      Colin Walters authored
      This is a variant of g_file_get_path() which returns a const string to
      the caller, rather than transferring ownership.
      
      I've been carrying `gs_file_get_path_cached()` in libgsystem and it
      has seen a lot of use in the ostree and flatpak codebases.  There are
      probably others too.
      
      I think language bindings like Python/Gjs could also use this to avoid
      an extra malloc (i.e. we could transparently replace
      `g_file_get_path()` with `g_file_peek_path()`.
      
      (Originally by Colin Walters. Tweaked by Philip Withnall to update to
      2.56, change the function name and drop the locking.)
      
      https://bugzilla.gnome.org/show_bug.cgi?id=767976
      4808a957
  7. 12 Jan, 2018 1 commit
  8. 15 Nov, 2017 1 commit
  9. 07 Nov, 2017 1 commit
  10. 26 Oct, 2017 1 commit
  11. 11 Oct, 2017 1 commit
  12. 05 Oct, 2017 1 commit
  13. 18 Aug, 2017 1 commit
  14. 03 Aug, 2017 1 commit
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      Prevent the situation where errno is set by function A, then function B
      is called (which is typically _(), but could be anything else) and it
      overwrites errno, then errno is checked by the caller.
      
      errno is a horrific API, and we need to be careful to save its value as
      soon as a function call (which might set it) returns. i.e. Follow the
      pattern:
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
      
        if (ret < 0)
          puts (strerror (errsv));
      
      This patch implements that pattern throughout GLib. There might be a few
      places in the test code which still use errno directly. They should be
      ported as necessary. It doesn’t modify all the call sites like this:
        if (some_call_which_might_set_errno () && errno == ESOMETHING)
      since the refactoring involved is probably more harmful than beneficial
      there. It does, however, refactor other call sites regardless of whether
      they were originally buggy.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=785577
      5cddde1f
  15. 21 Jun, 2017 1 commit
  16. 02 Jun, 2017 1 commit
  17. 29 May, 2017 1 commit
  18. 11 Jan, 2017 2 commits
  19. 22 Nov, 2016 1 commit
  20. 12 Oct, 2016 1 commit
  21. 29 Jun, 2016 1 commit
  22. 15 Jun, 2016 1 commit
  23. 07 Jun, 2016 1 commit
  24. 04 Jun, 2016 1 commit
  25. 24 Aug, 2015 2 commits
  26. 21 Aug, 2015 1 commit
    • Christophe Fergeau's avatar
      Fix GError leak in g_file_query_writable_namespaces() · 60a6ae6f
      Christophe Fergeau authored
      gvfs commit b358ca "Make sure metadata is always returned by
      query_writable_namespaces()" changed the
      query_writable_namespaces vfunc to never return NULL, but the error
      checking in g_daemon_file_query_writable_namespaces still assumes vfunc
      failure implies NULL return value and GError set. This causes a memory
      leak as on failure the GError will be set but the vfunc implementation
      will have created its own default list so NULL will not be returned, and
      the GError will never be cleared.
      
      This commit directly checks if the GError is set to detect failures,
      my_error is directly dereferenced in the error block anyway.
      
      This also removes an unneeded call to g_file_attribute_info_new(); as
      the vfunc always returns us a non-NULL GFileAttributeInfoList.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=747364
      60a6ae6f
  27. 17 Jun, 2015 1 commit
  28. 03 Mar, 2015 1 commit
  29. 18 Dec, 2014 3 commits
  30. 30 Oct, 2014 1 commit
  31. 21 Oct, 2014 1 commit
  32. 11 Oct, 2014 1 commit
  33. 28 Jul, 2014 1 commit
  34. 23 Jul, 2014 1 commit
  35. 29 Jun, 2014 1 commit
    • Sébastien Wilmet's avatar
      doc: improve doc of g_file_equal() · ffe286e6
      Sébastien Wilmet authored
      A critical message is printed when a parameter of g_file_equal() is not
      a GFile. When we read the documentation before this commit, we can think
      that passing NULL or another type than GFile is allowed, but it is not
      the case.
      
      Another option is to allow NULL parameters. But for consistency with
      e.g. g_str_equal(), it's probably better to keep the code as is.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=732357
      ffe286e6