src/ui/gui/psppire-conf.c: On error, give a reason for failure to create file
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 2 Aug 2020 17:17:19 +0000 (19:17 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 16 Aug 2020 07:01:26 +0000 (09:01 +0200)
src/ui/gui/psppire-conf.c

index 835d58c127bbbd850592cbf697c1fd73e3bc99b0..eb65b63ad9ac2d19e59ad422f800932268f88cfe 100644 (file)
@@ -84,7 +84,8 @@ flush_conf (PsppireConf *conf)
 
   if (! g_file_set_contents (conf->filename, kf, length, NULL))
     {
-      g_warning ("Cannot open %s for writing", conf->filename);
+      char *msg = strerror (errno);
+      g_warning ("Cannot open %s for writing: %s", conf->filename, msg);
     }
 
   g_free (kf);