std::string dbpath = GetLocalDatabasePath();
// Create or open local database
- mLocalDatabase = createDB(i_nameDB, mCurrentDirectory + "\\.gimmick\\localdatabase_Descriptor.txt", dbpath);
+ std::string dpath= mCurrentDirectory + "/.gimmick/localdatabase_Descriptor.txt";
+ boost::algorithm::replace_all( dpath,
+ INVALID_FILE_SEPARATOR ,
+ VALID_FILE_SEPARATOR);
+ mLocalDatabase = createDB(i_nameDB, dpath, dbpath);
// Add it to the TreeHandlerMap
mTreeHandlerMap[i_nameDB] = mLocalDatabase;
command = "create table LEVELS\n";
command += "( Name text )\n";
UPDATEDB(command);
-
+ int l;
// Iterate the Levels
- for (int l=0; l<GetTree().GetNumberOfLevels(); ++l)
+ for (l=0; l<GetTree().GetNumberOfLevels(); l++)
{
command = "INSERT INTO LEVELS (Name) VALUES ('";
command += GetTree().GetLevelDescriptor(l).GetName();