Skip to content

Commit

Permalink
Use g_build_filename().
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Monin committed May 21, 2008
1 parent f42ea51 commit ec28448
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/trash.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,15 @@ void file_util_trash_clear(void)
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)
Expand Down

0 comments on commit ec28448

Please sign in to comment.