]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Account.cpp
Dirs are now created if missing under GNU/Linux
[lugaru.git] / Source / Account.cpp
index f650330a0f87bcbb3d9c456eb03488bf3fca5d88..b93eff19ad5978f91628d4885a43c70a879c31be 100644 (file)
@@ -115,6 +115,7 @@ Account* Account::loadFile(string filename)
     FILE *tfile;
     int numaccounts;
     int accountactive;
+    errno = 0;
 
     tfile = fopen(filename.c_str(), "rb" );
 
@@ -194,6 +195,7 @@ Account* Account::loadFile(string filename)
 void Account::saveFile(string filename, Account* accountactive)
 {
     FILE *tfile;
+    errno = 0;
 
     tfile = fopen(filename.c_str(), "wb" );
     if (tfile) {