[gvfs/wip/rishi/goa] Don't set the size for Drive-native files



commit 016f656655d04b1d6ea85f3338e1c86e8b372311
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 7 18:42:00 2015 +0200

    Don't set the size for Drive-native files

 daemon/gvfsbackendgoogle.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 5a51ba6..420f42b 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -889,7 +889,6 @@ build_file_info (GVfsBackendGoogle      *self,
   gint64 atime;
   gint64 ctime;
   gint64 mtime;
-  goffset quota_used;
   gsize i;
 
   if (GDATA_IS_DOCUMENTS_FOLDER (entry))
@@ -929,6 +928,13 @@ build_file_info (GVfsBackendGoogle      *self,
           uri = gdata_link_get_uri (alternate);
           g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_TARGET_URI, uri);
         }
+      else
+        {
+          goffset quota_used;
+
+          quota_used = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (entry));
+          g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (guint64) quota_used);
+        }
     }
 
   if (is_symlink)
@@ -971,9 +977,6 @@ build_file_info (GVfsBackendGoogle      *self,
 
   g_file_info_set_file_type (info, file_type);
 
-  quota_used = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (entry));
-  g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (guint64) quota_used);
-
   if (is_root)
     goto out;
 


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