changeset 727:d897ff542ad9

Use g_build_filename().
author zas_
date Wed, 21 May 2008 11:45:29 +0000
parents a1dcef8cd1ae
children 5042236af960
files src/trash.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/trash.c	Wed May 21 11:07:23 2008 +0000
+++ b/src/trash.c	Wed May 21 11:45:29 2008 +0000
@@ -92,9 +92,15 @@
 static gchar *file_util_safe_dest(const gchar *path)
 {
 	gint n;
+	gchar *name;
+	gchar *dest;
 
 	n = file_util_safe_number(filesize(path));
-	return g_strdup_printf("%s/%06d_%s", options->file_ops.safe_delete_path, n, filename_from_path(path));
+	name = g_strdup_printf("%06d_%s", n, filename_from_path(path));
+	dest = g_build_filename(options->file_ops.safe_delete_path, name, NULL);
+	g_free(name);
+
+	return dest;
 }
 
 static void file_util_safe_del_toggle_cb(GtkWidget *button, gpointer data)