[glib] Fix GContentType usage
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix GContentType usage
- Date: Mon, 5 Jan 2015 03:10:25 +0000 (UTC)
commit aa4e2d4dc3131076bed5f8e3fb83d4238a4f93b9
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]