[Spice-devel] [PATCH] option: use more portable default ca-file path

Marc-André Lureau marcandre.lureau at gmail.com
Wed Apr 23 08:20:16 PDT 2014


If no CA path is given, a default one is set. Use g_build_filename() to
set a more portable and valid default path.
---
 gtk/spice-option.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-option.c b/gtk/spice-option.c
index 1c861e2..2d03912 100644
--- a/gtk/spice-option.c
+++ b/gtk/spice-option.c
@@ -225,7 +225,7 @@ void spice_set_session_option(SpiceSession *session)
         const char *homedir = g_getenv("HOME");
         if (!homedir)
             homedir = g_get_home_dir();
-        ca_file = g_strdup_printf("%s/.spicec/spice_truststore.pem", homedir);
+        ca_file = g_build_filename(homedir, ".spicec", "spice_truststore.pem", NULL);
     }
 
     if (disable_effects) {
-- 
1.8.5.3



More information about the Spice-devel mailing list