diff --git a/daemon/gvfsbackendarchive.c b/daemon/gvfsbackendarchive.c
index 8c9f962..ebdd3c7 100644
--- a/daemon/gvfsbackendarchive.c
+++ b/daemon/gvfsbackendarchive.c
@@ -349,7 +349,8 @@ create_root_file (GVfsBackendArchive *ba)
 }
 
 static void
-archive_file_set_info_from_entry (ArchiveFile *	        file, 
+archive_file_set_info_from_entry (GVfsArchive *		archive,
+				  ArchiveFile *	        file, 
 				  struct archive_entry *entry,
 				  guint64               entry_index)
 {
@@ -406,8 +407,35 @@ archive_file_set_info_from_entry (ArchiveFile *	        file,
 				   file->name,
 				   type);
 
+  size_t size = 0;
+  if (!archive_entry_size_is_set (entry)) 
+    { /* Read data blocks to determine size. */
+      int result;
+      const void *block;
+      int64_t offset;
+      size_t read;
+
+      do
+	{
+	  result = archive_read_data_block (archive->archive, &block, &read, &offset);
+	  if (result != ARCHIVE_OK) 
+	    {
+	      DEBUG ("archive_read_data_block: result = %d, error = '%s'\n", result, archive_error_string (archive->archive));
+	      archive_set_error (archive->archive, ARCHIVE_OK, "No error");
+	      archive_clear_error (archive->archive);
+	    }
+
+	  size += read;
+	}
+      while (result != ARCHIVE_EOF && result == ARCHIVE_OK);
+    }
+  else
+    {
+      size = archive_entry_size (entry);
+    }
+
   g_file_info_set_size (info,
-			archive_entry_size (entry));
+			size);
 
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE);
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, FALSE);
@@ -492,7 +520,7 @@ create_file_tree (GVfsBackendArchive *ba, GVfsJob *job)
 							  TRUE);
           /* Don't set info for root */
           if (file != ba->files)
-            archive_file_set_info_from_entry (file, entry, entry_index);
+            archive_file_set_info_from_entry (archive, file, entry, entry_index);
 	  archive_read_data_skip (archive->archive);
 	  entry_index++;
 	}
