[glib/glib-2-42] Fix GContentType usage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-42] Fix GContentType usage
- Date: Thu, 26 Feb 2015 03:48:38 +0000 (UTC)
commit 9b70ddc94c2404884194f4d9e25f19ca2f4c0c93
Author: TingPing <tingping tingping se>
Date: Sat Aug 16 04:47:46 2014 -0400
Fix GContentType usage
https://bugzilla.gnome.org/show_bug.cgi?id=734946
gio/glocalfileinfo.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 7c46837..f75a0d2 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1218,20 +1218,20 @@ get_content_type (const char *basename,
{
if (is_symlink &&
(symlink_broken || (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)))
- return g_strdup ("inode/symlink");
+ return g_content_type_from_mime_type ("inode/symlink");
else if (statbuf != NULL && S_ISDIR(statbuf->st_mode))
- return g_strdup ("inode/directory");
+ return g_content_type_from_mime_type ("inode/directory");
#ifndef G_OS_WIN32
else if (statbuf != NULL && S_ISCHR(statbuf->st_mode))
- return g_strdup ("inode/chardevice");
+ return g_content_type_from_mime_type ("inode/chardevice");
else if (statbuf != NULL && S_ISBLK(statbuf->st_mode))
- return g_strdup ("inode/blockdevice");
+ return g_content_type_from_mime_type ("inode/blockdevice");
else if (statbuf != NULL && S_ISFIFO(statbuf->st_mode))
- return g_strdup ("inode/fifo");
+ return g_content_type_from_mime_type ("inode/fifo");
#endif
#ifdef S_ISSOCK
else if (statbuf != NULL && S_ISSOCK(statbuf->st_mode))
- return g_strdup ("inode/socket");
+ return g_content_type_from_mime_type ("inode/socket");
#endif
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]