Mercurial > hg > forks > geeqie
changeset 1930:f96b5dfa3ec2
consistent use of fd->extension
author | Vladimir Nadvornik <nadvornik@suse.cz> |
---|---|
date | Sat, 01 Oct 2011 17:11:10 +0200 |
parents | 6d8d5ea87cc2 |
children | 9e9011b16645 |
files | src/filedata.c |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/filedata.c Sat Oct 01 16:31:58 2011 +0200 +++ b/src/filedata.c Sat Oct 01 17:11:10 2011 +0200 @@ -169,8 +169,7 @@ static GList * file_data_basename_hash_insert(GHashTable *basename_hash, FileData *fd) { GList *list; - const gchar *ext = extension_from_path(fd->path); - gchar *basename = ext ? g_strndup(fd->path, ext - fd->path) : g_strdup(fd->path); + gchar *basename = g_strndup(fd->path, fd->extension - fd->path); list = g_hash_table_lookup(basename_hash, basename); @@ -190,8 +189,7 @@ static void file_data_basename_hash_remove(GHashTable *basename_hash, FileData *fd) { GList *list; - const gchar *ext = extension_from_path(fd->path); - gchar *basename = ext ? g_strndup(fd->path, ext - fd->path) : g_strdup(fd->path); + gchar *basename = g_strndup(fd->path, fd->extension - fd->path); list = g_hash_table_lookup(basename_hash, basename); @@ -788,7 +786,7 @@ if (!existing_only && !sidecar_path) { - gchar *base = remove_extension_from_path(fd->path); + gchar *base = g_strndup(fd->path, fd->extension - fd->path); sidecar_path = g_strconcat(base, ".xmp", NULL); g_free(base); }