diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2014-04-24 15:45:21 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2014-04-24 15:45:21 +0200 |
commit | 8c8948597ec2a7f7f50468020bcd37046762813d (patch) | |
tree | 4c0655b39698c8c511eacd866c6cde5db91948b6 | |
parent | 39ded7a4d19ee0e783a7027ff58eb022cd6b1e91 (diff) |
option: check that default ca-file exists
Don't set default ca-file path if the file doesn't exists.
-rw-r--r-- | gtk/spice-option.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/spice-option.c b/gtk/spice-option.c index 2d03912..0a0f9ef 100644 --- a/gtk/spice-option.c +++ b/gtk/spice-option.c @@ -226,6 +226,8 @@ void spice_set_session_option(SpiceSession *session) if (!homedir) homedir = g_get_home_dir(); ca_file = g_build_filename(homedir, ".spicec", "spice_truststore.pem", NULL); + if (!g_file_test(ca_file, G_FILE_TEST_IS_REGULAR)) + g_clear_pointer(&ca_file, g_free); } if (disable_effects) { |