[gvfs] dav: Report number of bytes used on the filesystem



commit 304ea0b47d80018ec49712677f5090feeb7a8c24
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Tue Nov 19 10:40:12 2013 +0200

    dav: Report number of bytes used on the filesystem
    
    Report the number of bytes used by exposing the "quota-used-bytes"
    property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712654

 daemon/gvfsbackenddav.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 39995d6..a661230 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -1147,6 +1147,11 @@ ms_response_to_fs_info (MsResponse *response,
         }
     }
 
+  if (have_bytes_used)
+    g_file_info_set_attribute_uint64 (info,
+                                      G_FILE_ATTRIBUTE_FILESYSTEM_USED,
+                                      bytes_used);
+
   if (have_bytes_avail)
     {
       g_file_info_set_attribute_uint64 (info,
@@ -2072,6 +2077,8 @@ do_query_fs_info (GVfsBackend           *backend,
   if (! (g_file_attribute_matcher_matches (attribute_matcher,
                                            G_FILE_ATTRIBUTE_FILESYSTEM_SIZE) ||
          g_file_attribute_matcher_matches (attribute_matcher,
+                                           G_FILE_ATTRIBUTE_FILESYSTEM_USED) ||
+         g_file_attribute_matcher_matches (attribute_matcher,
                                            G_FILE_ATTRIBUTE_FILESYSTEM_FREE)))
     {
       g_vfs_job_succeeded (G_VFS_JOB (job));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]