Permalink
Browse files

force flush of db after initial creation of auth db

  • Loading branch information...
1 parent 22e7015 commit 6ce9281bec405155f5a1bf6fbc8d96663c3b12a7 @RJ committed Sep 8, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/auth.cpp
View
@@ -30,6 +30,7 @@ using namespace std;
auth::auth(const string& dbfilepath)
: m_db(dbfilepath.c_str())
{
+ m_dbfilepath = dbfilepath;
check_db();
}
@@ -160,7 +161,8 @@ auth::create_db_schema()
cmd.execute();
}
}
- cout << "Schema created." << endl;
+ cout << "Schema created, reopening." << endl;
+ m_db.connect( m_dbfilepath.c_str() ); // this will close/flush and reopen the file
}

0 comments on commit 6ce9281

Please sign in to comment.