[Gnucash-changes] r13293 -
gnucash/trunk/src/import-export/log-replay - Also report an
error dialog if the fopen() fails.
Derek Atkins
warlord at cvs.gnucash.org
Sat Feb 18 11:53:47 EST 2006
Author: warlord
Date: 2006-02-18 11:53:45 -0500 (Sat, 18 Feb 2006)
New Revision: 13293
Trac: http://svn.gnucash.org/trac/changeset/13293
Modified:
gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
Log:
Also report an error dialog if the fopen() fails.
Modified: gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2006-02-18 16:45:50 UTC (rev 13292)
+++ gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2006-02-18 16:53:45 UTC (rev 13293)
@@ -33,6 +33,7 @@
#include <string.h>
#include <sys/time.h>
#include <libguile.h>
+#include <errno.h>
#include "Account.h"
#include "Transaction.h"
@@ -527,7 +528,16 @@
log_file = fopen(selected_filename, "r");
if(!log_file || ferror(log_file)!=0)
{
+ int err = errno;
perror("File open failed");
+ gnc_error_dialog(NULL,
+ /* Translation note:
+ * First argument is the filename,
+ * second argument is the error.
+ */
+ _("Failed to open log file: %s: %s"),
+ selected_filename,
+ strerror(err));
}
else
{
More information about the gnucash-changes
mailing list