[evolution] Build filename using g_build_filename instead of hardcoding forward-slash



commit c46630b0d54a31c9b27ed728f2c39283f1eef786
Author: Tobias Mueller <tobiasmue gnome org>
Date:   Wed Nov 4 20:31:25 2009 +0000

    Build filename using g_build_filename instead of hardcoding forward-slash

 plugins/backup-restore/backup-restore.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c
index ed7401e..50db1bb 100644
--- a/plugins/backup-restore/backup-restore.c
+++ b/plugins/backup-restore/backup-restore.c
@@ -73,14 +73,16 @@ sanity_check (const gchar *filename)
 {
 	gchar *command;
 	gint result;
-	gchar *quotedfname;
+	gchar *quotedfname, *toolfname;
 
 	quotedfname = g_shell_quote(filename);
+	toolfname = g_build_filename (EVOLUTION_TOOLSDIR, "evolution-backup", NULL);
 
-	command = g_strdup_printf ("%s/evolution-backup --check %s", EVOLUTION_TOOLSDIR, quotedfname);
+	command =  g_strdup_printf("%s --check %s", toolfname, quotedfname);
 	result = system (command);
 	g_free (command);
 	g_free (quotedfname);
+	g_free (toolfname);
 
 #ifdef HAVE_SYS_WAIT_H
 	g_message ("Sanity check result %d:%d %d", WIFEXITED (result), WEXITSTATUS (result), result);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]