gvfs/gvfs-1.3.4-smb-browse-fake-content-type.patch
Tomas Bzatek b84fbc0b96 - Fix gedit crashed with SEGV in strlen()
- Fix SMB protocol not handled when opening from a bookmark (#509832)
2009-08-04 15:42:43 +00:00

35 lines
1.4 KiB
Diff

From fa09fd4e5dda701c8862ce2d7762698b907cf90f Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Fri, 31 Jul 2009 16:58:54 +0200
Subject: [PATCH] smb-browse: fake content type to allow query default handler
Hardcode the "inode/directory" content-type
Fixes #573994
---
daemon/gvfsbackendsmbbrowse.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c
index 6d0c07e..2eebdd2 100644
--- a/daemon/gvfsbackendsmbbrowse.c
+++ b/daemon/gvfsbackendsmbbrowse.c
@@ -1229,6 +1229,7 @@ get_file_info_from_entry (GVfsBackendSmbBrowse *backend, BrowseEntry *entry, GFi
g_file_info_set_edit_name (info, entry->name_utf8);
g_file_info_set_attribute_string (info, "smb::comment", entry->comment);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL, TRUE);
+ g_file_info_set_content_type (info, "inode/directory");
icon = NULL;
if (entry->smbc_type == SMBC_WORKGROUP)
@@ -1355,6 +1356,7 @@ try_query_info (GVfsBackend *backend,
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
g_file_info_set_name (info, "/");
g_file_info_set_display_name (info, g_vfs_backend_get_display_name (backend));
+ g_file_info_set_content_type (info, "inode/directory");
icon = g_vfs_backend_get_icon (backend);
if (icon != NULL)
g_file_info_set_icon (info, icon);
--
1.6.3.3