1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
if the database can't be created error so that the user knows.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511342
--- a/src/Loaders.cc
+++ b/src/Loaders.cc
@@ -215,7 +215,11 @@
{
ofstream of(file.c_str());
- if (of.bad()) return false;
+ if(of.fail( ) || of.bad( )) {
+ cout << "ERROR: Failed to create/open file: " << file << "\n";
+ exit(1);
+ }
+
if (options.verbose > 1)
cout << "todo: saving to database '" << file << "'" << endl;
of << "<?xml version=\"1.0\"?>" << endl;
|