[gvfs/gnome-3-8] dav: Set file type to regular by default
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gnome-3-8] dav: Set file type to regular by default
- Date: Fri, 22 Nov 2013 13:58:32 +0000 (UTC)
commit b29ccc368d239e28e9ad07216c71d9fdde9c1707
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Fri Oct 11 22:04:51 2013 +0200
dav: Set file type to regular by default
Some servers send empty resourcetype nodes or don't send the node at all
for regular files (the spec says that it defaults to empty). Set the
file type to regular by default.
https://bugzilla.gnome.org/show_bug.cgi?id=706798
daemon/gvfsbackenddav.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 2feb980..39995d6 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -991,7 +991,7 @@ ms_response_to_file_info (MsResponse *response,
g_file_info_set_name (info, basename);
g_file_info_set_edit_name (info, basename);
- file_type = G_FILE_TYPE_UNKNOWN;
+ file_type = G_FILE_TYPE_REGULAR;
mime_type = NULL;
have_display_name = FALSE;
@@ -1013,7 +1013,6 @@ ms_response_to_file_info (MsResponse *response,
if (node_has_name (node, "resourcetype"))
{
file_type = parse_resourcetype (node);
- g_file_info_set_file_type (info, file_type);
}
else if (node_has_name (node, "displayname") && text)
{
@@ -1059,6 +1058,7 @@ ms_response_to_file_info (MsResponse *response,
}
}
+ g_file_info_set_file_type (info, file_type);
if (file_type == G_FILE_TYPE_DIRECTORY)
{
icon = g_themed_icon_new ("folder");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]