From 44a2389f517a6cc60a2b8b0f1d7da1eabb410133 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 2 Aug 2020 19:17:19 +0200 Subject: [PATCH] src/ui/gui/psppire-conf.c: On error, give a reason for failure to create file --- src/ui/gui/psppire-conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-conf.c b/src/ui/gui/psppire-conf.c index 835d58c127..eb65b63ad9 100644 --- a/src/ui/gui/psppire-conf.c +++ b/src/ui/gui/psppire-conf.c @@ -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); -- 2.30.2