From 8086604fc1462ec592afeda64a3b6e00427b2d80 Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Thu, 4 Aug 2005 11:11:39 +0000 Subject: [PATCH] follow symlinks when getting info. Fixes part of #309744. 2005-08-04 Paolo Borelli * font-view.c (add_face_info): follow symlinks when getting info. Fixes part of #309744. --- vfs-methods/fontilus/ChangeLog | 5 +++++ vfs-methods/fontilus/font-view.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/vfs-methods/fontilus/ChangeLog b/vfs-methods/fontilus/ChangeLog index 25c674d9d..bae1b23ac 100644 --- a/vfs-methods/fontilus/ChangeLog +++ b/vfs-methods/fontilus/ChangeLog @@ -1,3 +1,8 @@ +2005-08-04 Paolo Borelli + + * font-view.c (add_face_info): follow symlinks when getting + info. Fixes part of #309744. + 2005-05-12 James Henstridge * font-method.c (ensure_font_list): use NULL as the var args diff --git a/vfs-methods/fontilus/font-view.c b/vfs-methods/fontilus/font-view.c index ba4816a1e..9c4b236ed 100644 --- a/vfs-methods/fontilus/font-view.c +++ b/vfs-methods/fontilus/font-view.c @@ -270,6 +270,7 @@ static void add_face_info(GtkWidget *table, gint *row_p, const gchar *uri, FT_Face face) { GnomeVFSFileInfo *file_info; + GnomeVFSResult res; PS_FontInfoRec ps_info; add_row(table, row_p, _("Name:"), face->family_name, FALSE); @@ -278,16 +279,16 @@ add_face_info(GtkWidget *table, gint *row_p, const gchar *uri, FT_Face face) add_row(table, row_p, _("Style:"), face->style_name, FALSE); file_info = gnome_vfs_file_info_new(); - if (gnome_vfs_get_file_info - (uri, file_info, GNOME_VFS_FILE_INFO_GET_MIME_TYPE) == GNOME_VFS_OK) { - + res = gnome_vfs_get_file_info(uri, file_info, + GNOME_VFS_FILE_INFO_GET_MIME_TYPE | + GNOME_VFS_FILE_INFO_FOLLOW_LINKS); + if (res == GNOME_VFS_OK) { if ((file_info->valid_fields&GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE)!=0){ const gchar *type = gnome_vfs_mime_get_description(file_info->mime_type); add_row(table, row_p, _("Type:"), type ? type : file_info->mime_type, FALSE); } - if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) != 0) { gchar *size; size = gnome_vfs_format_file_size_for_display(file_info->size);