summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendmtp.c
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2018-05-29 17:14:24 +0200
committerOndrej Holy <oholy@redhat.com>2018-08-14 08:13:53 +0000
commitc0699c2e3c702b9efd610f4bf364ace9c70a273a (patch)
treea78d79726144bed601c252e6073042ea9a754bff /daemon/gvfsbackendmtp.c
parent9f465f555a6abc7bb03c9b7582f5c58cfe0b7b6c (diff)
downloadgvfs-c0699c2e3c702b9efd610f4bf364ace9c70a273a.tar.gz
Remove workaround for directory / folder iconswip/rishi/issue-2
https://gitlab.gnome.org/GNOME/gvfs/issues/2
Diffstat (limited to 'daemon/gvfsbackendmtp.c')
-rw-r--r--daemon/gvfsbackendmtp.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 7ee95aef..a7be4f3f 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -1255,24 +1255,22 @@ get_file_info (GVfsBackend *backend,
case LIBMTP_FILETYPE_FOLDER:
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE, TRUE);
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
- g_file_info_set_content_type (info, "inode/directory");
- g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE,
- "inode/directory");
- icon = g_themed_icon_new ("folder");
- symbolic_icon = g_themed_icon_new ("folder-symbolic");
+ content_type = g_strdup ("inode/directory");
break;
default:
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE, FALSE);
g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR);
content_type = g_content_type_guess (file->filename, NULL, 0, NULL);
- g_file_info_set_content_type (info, content_type);
- g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE,
- content_type);
- icon = g_content_type_get_icon (content_type);
- symbolic_icon = g_content_type_get_symbolic_icon (content_type);
break;
}
+ g_file_info_set_content_type (info, content_type);
+ g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE,
+ content_type);
+
+ icon = g_content_type_get_icon (content_type);
+ symbolic_icon = g_content_type_get_symbolic_icon (content_type);
+
if (LIBMTP_FILETYPE_IS_IMAGE (file->filetype) ||
LIBMTP_FILETYPE_IS_VIDEO (file->filetype) ||
LIBMTP_FILETYPE_IS_AUDIOVIDEO (file->filetype)) {