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

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

 



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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]