[gvfs] afc: Implement standard::allocated-size



commit ebdd9bd15502d5cad8b4f9079bb26adc6b4cf527
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Sun Jun 1 22:22:57 2014 +0100

    afc: Implement standard::allocated-size
    
    https://bugzilla.gnome.org/show_bug.cgi?id=505042

 daemon/gvfsbackendafc.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 1b219e9..91cc5c8 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -1463,7 +1463,11 @@ g_vfs_backend_afc_set_info_from_afcinfo (GVfsBackendAfc *self,
         }
       else if (g_str_equal (afcinfo[i], "st_blocks"))
         {
-            g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_UNIX_BLOCKS, atoi(afcinfo[i+1]));
+          int blocks = atoi(afcinfo[i+1]);
+          g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_UNIX_BLOCKS, blocks);
+          g_file_info_set_attribute_uint64 (info,
+                                            G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE,
+                                            blocks * G_GUINT64_CONSTANT (512));
         }
       else if (g_str_equal (afcinfo[i], "st_ifmt"))
         {


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