Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntenore Gatta <antenore@simbiosi.org>2019-07-19 01:22:14 +0300
committerAntenore Gatta <antenore@simbiosi.org>2019-07-19 01:22:14 +0300
commit30391cbea4f7b8f355a311d230000c60139c33b2 (patch)
tree2717120189f2ad4fc8dc824c23574aad72438886 /src
parent1beaba870416119c73e769b56bd3330e358e397b (diff)
Try to save the preferences only if the file is writable
Diffstat (limited to 'src')
-rw-r--r--src/remmina_pref.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/remmina_pref.c b/src/remmina_pref.c
index 4629320e1..149fd7420 100644
--- a/src/remmina_pref.c
+++ b/src/remmina_pref.c
@@ -688,9 +688,15 @@ gboolean remmina_pref_is_rw(void)
return FALSE;
return FALSE;
}
+
gboolean remmina_pref_save(void)
{
TRACE_CALL(__func__);
+
+ if (remmina_pref_is_rw() == FALSE) {
+ g_debug ("remmina.pref is not writable, returning");
+ return FALSE;
+ }
GKeyFile *gkeyfile;
GError *error = NULL;
gchar *content;
@@ -802,7 +808,7 @@ gboolean remmina_pref_save(void)
if (error != NULL)
{
- g_print ("%s\n", error->message);
+ g_error ("iremmina_pref_save error: %s", error->message);
g_clear_error (&error);
g_key_file_free(gkeyfile);
g_free(content);