[gthumb] Fixed the %N return value in gth_script
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Fixed the %N return value in gth_script
- Date: Mon, 22 Feb 2010 10:52:31 +0000 (UTC)
commit a760fc891cff874c77e6b021d461a7687044b68c
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Feb 22 11:49:41 2010 +0100
Fixed the %N return value in gth_script
[bug #610631]
extensions/list_tools/gth-script.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/extensions/list_tools/gth-script.c b/extensions/list_tools/gth-script.c
index 3080446..fb692ed 100644
--- a/extensions/list_tools/gth-script.c
+++ b/extensions/list_tools/gth-script.c
@@ -515,17 +515,17 @@ get_basename_func (GthFileData *file_data)
static char *
-get_name_wo_ext_func (GthFileData *file_data)
+get_basename_wo_ext_func (GthFileData *file_data)
{
- char *path;
- char *name;
+ char *basename;
+ char *basename_wo_ext;
- path = g_file_get_path (file_data->file);
- name = _g_uri_remove_extension (path);
+ basename = g_file_get_basename (file_data->file);
+ basename_wo_ext = _g_uri_remove_extension (basename);
- g_free (path);
+ g_free (basename);
- return name;
+ return basename_wo_ext;
}
@@ -730,7 +730,7 @@ command_line_eval_cb (const GMatchInfo *info,
else if (strcmp (match, "%B") == 0)
r = create_file_list (replace_data->file_list, get_basename_func, replace_data->quote_values);
else if (strcmp (match, "%N") == 0)
- r = create_file_list (replace_data->file_list, get_name_wo_ext_func, replace_data->quote_values);
+ r = create_file_list (replace_data->file_list, get_basename_wo_ext_func, replace_data->quote_values);
else if (strcmp (match, "%E") == 0)
r = create_file_list (replace_data->file_list, get_ext_func, replace_data->quote_values);
else if (strcmp (match, "%P") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]