1. 17 Sep, 2013 2 commits
    • Allison Karlitskaya's avatar
      measure_disk_usage: properly report results · b72c4666
      Allison Karlitskaya authored
      In the async case, make sure we copy all of the out parameters from the
      results structure, not just 'disk_usage'.
      b72c4666
    • Allison Karlitskaya's avatar
      measure_disk_usage: skip progress on NULL callback · dbf95a5a
      Allison Karlitskaya authored
      In the real_..._async wrapper for GFile.measure_disk_usage, skip the
      wrapping of the progress callback in the case that the user gave a NULL
      callback to the async function.  This is a performance improvement
      because the sync version won't have to do continuous sampling of the
      clock to issue a call to the wrapper which will then do nothing.
      
      Unfortunately, I made this simplifying assumption when writing the
      wrapper, but forgot to actually implement it when making the sync call.
      As a result, the wrapper is still called, and invokes the NULL callback,
      causing a segfault.
      
      Make sure we pass NULL if the user's callback was NULL.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=707787
      dbf95a5a
  2. 06 Sep, 2013 1 commit
  3. 05 Jun, 2013 2 commits
    • Colin Walters's avatar
      Ensure g_file_copy() does not temporarily expose private files · 9f1a0b57
      Colin Walters authored
      Previously, g_file_copy() would (on Unix) create files with the
      default mode of 644.  For applications which might at user request
      copy arbitrary private files such as ~/.ssh or /etc/shadow, a
      world-readable copy would be temporarily exposed.
      
      This patch is suboptimal in that it *only* fixes g_file_copy()
      for the case where both source and destination are instances of
      GLocalFile on Unix.
      
      The reason for this is that the public GFile APIs for creating files
      allow very limited control over the access permissions for the created
      file; one can either say a file is "private" or not.  Fixing
      this by adding e.g. g_file_create_with_attributes() would make sense,
      except this would entail 8 new API calls for all the variants of
      _create(), _create_async(), _replace(), _replace_async(),
      _create_readwrite(), _create_readwrite_async(), _replace_readwrite(),
      _replace_readwrite_async().  That can be done as a separate patch
      later.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=699959
      9f1a0b57
    • Colin Walters's avatar
      g_file_copy(): Clean up logic for info query · 02aaef5a
      Colin Walters authored
      Previously, we called g_file_query_info() *again* on the source at the
      very end of the copy.  This has the lame semantics that if the source
      happened to be deleted, we would fail to apply attributes to the
      destination.  This could even be a security flaw.
      
      This commit changes things so that we query info from the source
      *stream* after opening - i.e. on Unix we use the proper fstat() and
      friends.  That way we operate more atomically.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=699959
      02aaef5a
  4. 19 Apr, 2013 2 commits
  5. 10 Apr, 2013 2 commits
  6. 25 Mar, 2013 1 commit
  7. 10 Feb, 2013 1 commit
  8. 29 Jan, 2013 1 commit
    • Colin Walters's avatar
      Add g_close(), use it · f398bec5
      Colin Walters authored
      There are two benefits to this:
      
      1) We can centralize any operating system specific knowledge of
         close-vs-EINTR handling.  For example, while on Linux we should never
         retry, if someone cared enough later about HP-UX, they could come by
         and change this one spot.
      2) For places that do care about the return value and want to provide
         the caller with a GError, this function makes it convenient to do so.
      
      Note that gspawn.c had an incorrect EINTR loop-retry around close().
      
      https://bugzilla.gnome.org/show_bug.cgi?id=682819
      f398bec5
  9. 27 Jan, 2013 1 commit
  10. 25 Jan, 2013 1 commit
  11. 21 Jan, 2013 1 commit
  12. 05 Jan, 2013 1 commit
    • Nirbheek Chauhan's avatar
      GFile: Add Btrfs clone ioctl support · 5eba9784
      Nirbheek Chauhan authored
      The attached patch adds support for the btrfs "clone" ioctl which
      makes Copy-on-Write reflinks, resulting in cheap O(1) copies when
      source/destination are on the same filesystem. The ioctl itself is
      quite straightforward, and GNU coreutils has had support since 7.5
      (--reflink=auto --sparse=auto).
      
      The ioctl only operates on regular files and symlinks, and always
      follows symlinks; checks have been added accordingly.
      
      This patch would be very useful for everyone who uses btrfs
      filesystems (Meego folks for instance). On systems that don't have
      btrfs, or if the the source is not on a btrfs filesystem, the ioctl
      returns EINVAL, and the fallback code is triggered. Hence this will
      cause no problems for non-btrfs users.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=626497
      5eba9784
  13. 19 Dec, 2012 1 commit
  14. 18 Dec, 2012 1 commit
  15. 14 Dec, 2012 1 commit
  16. 30 Nov, 2012 1 commit
  17. 27 Nov, 2012 1 commit
  18. 10 Oct, 2012 1 commit
  19. 23 Sep, 2012 1 commit
  20. 03 Sep, 2012 1 commit
  21. 28 Aug, 2012 1 commit
  22. 16 Aug, 2012 3 commits
  23. 30 Jul, 2012 3 commits
  24. 10 Jul, 2012 3 commits
  25. 21 May, 2012 1 commit
  26. 15 May, 2012 2 commits
  27. 05 Apr, 2012 1 commit
  28. 31 Mar, 2012 1 commit
  29. 26 Feb, 2012 1 commit