Mercurial > geeqie
changeset 723:7638e83fed2a
Use g_build_filename() instead of g_strconcat().
author | zas_ |
---|---|
date | Wed, 21 May 2008 10:46:33 +0000 |
parents | 9a145206ec2c |
children | 9973edfd86f6 |
files | src/utilops.c |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/utilops.c Wed May 21 10:11:56 2008 +0000 +++ b/src/utilops.c Wed May 21 10:46:33 2008 +0000 @@ -2065,12 +2065,16 @@ gchar *new_name; new_name = file_util_rename_multiple_auto_format_name(format, fd->name, n); - dest = g_strconcat(base, "/", new_name, NULL); + dest = g_build_filename(base, new_name, NULL); g_free(new_name); } else { - dest = g_strdup_printf("%s/%s%0*d%s", base, front, padding, n, end); + gchar *new_name; + + new_name = g_strdup_printf("%s%0*d%s", front, padding, n, end); + dest = g_build_filename(base, new_name, NULL); + g_free(new_name); } if (isname(dest)) success = FALSE; @@ -2117,12 +2121,16 @@ gchar *new_name; new_name = file_util_rename_multiple_auto_format_name(format, fd->name, n); - dest = g_strconcat(base, "/", new_name, NULL); + dest = g_build_filename(base, new_name, NULL); g_free(new_name); } else { - dest = g_strdup_printf("%s/%s%0*d%s", base, front, padding, n, end); + gchar *new_name; + + new_name = g_strdup_printf("%s%0*d%s", front, padding, n, end); + dest = g_build_filename(base, new_name, NULL); + g_free(new_name); } if (!file_data_add_change_info(fd, FILEDATA_CHANGE_RENAME, fd->path, dest) ||