From f5d2969ebdf8e5f6f376b03571c9110159738491 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 9 Jul 2002 07:22:12 +0000 Subject: [PATCH] Fixed bug in error display on save config file SVN revision: 169 --- elogd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/elogd.c b/elogd.c index 43663068..6aaa4f4e 100755 --- a/elogd.c +++ b/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 2.39 2002/07/09 07:22:12 midas + Fixed bug in error display on save config file + Revision 2.38 2002/07/08 08:39:18 midas Fixed various small bugs @@ -4545,14 +4548,18 @@ char str[80]; fh = open(cfg_file, O_RDWR | O_BINARY | O_TRUNC, 644); if (fh < 0) { - sprintf(str, "%s: %s", loc("Cannot open file %s"), cfg_file, strerror(errno)); + sprintf(str, loc("Cannot open file %s"), cfg_file); + strcat(str, ": "); + strcat(str, strerror(errno)); show_error(str); return 0; } i = write(fh, _text, strlen(_text)); if (i < (int)strlen(_text)) { - sprintf(str, "%s: %s", loc("Cannot write to %s"), cfg_file, strerror(errno)); + sprintf(str, loc("Cannot write to %s"), cfg_file); + strcat(str, ": "); + strcat(str, strerror(errno)); show_error(str); close(fh); return 0;