[gvfs] http: Always set the file type to regular



commit 8082321c9d2c8e1f8bb8a679219af1507f297b1a
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Sat Jul 26 11:25:17 2014 +0100

    http: Always set the file type to regular
    
    Always set the file type to regular so that querying the type of an
    input stream gives the expected result.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632296

 daemon/gvfsbackendhttp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 2056a4a..0db563f 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -543,12 +543,13 @@ file_info_from_message (SoupMessage *msg,
   if (soup_message_headers_get_encoding(msg->response_headers) == SOUP_ENCODING_CONTENT_LENGTH)
     g_file_info_set_size (info, soup_message_headers_get_content_length (msg->response_headers));
 
+  g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR);
+
   text = soup_message_headers_get_content_type (msg->response_headers, NULL);
   if (text)
     {
       GIcon *icon;
 
-      g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR);
       g_file_info_set_content_type (info, text);
       g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, text);
 


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