diff options
Diffstat (limited to 'src/file-data.c')
-rw-r--r-- | src/file-data.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/file-data.c b/src/file-data.c index 911a5e9..cc0832f 100644 --- a/src/file-data.c +++ b/src/file-data.c @@ -103,10 +103,15 @@ file_data_get_type (void) void file_data_update_content_type (FileData *fdata) { - if (fdata->dir) + if (fdata->dir) { fdata->content_type = MIME_TYPE_DIRECTORY; - else - fdata->content_type = get_static_string (g_content_type_guess (fdata->full_path, NULL, 0, NULL)); + } else { + char *content_type; + + content_type = g_content_type_guess (fdata->full_path, NULL, 0, NULL); + fdata->content_type = get_static_string (content_type); + g_free (content_type); + } } |