]> Creatis software - creaImageIO.git/commitdiff
Modified due to problems in linux.
authorcaballero <caballero>
Wed, 10 Jun 2009 11:49:27 +0000 (11:49 +0000)
committercaballero <caballero>
Wed, 10 Jun 2009 11:49:27 +0000 (11:49 +0000)
src2/creaImageIOGimmick.cpp
src2/creaImageIOSQLiteTreeHandler.cpp

index 0dc9796582297d38a4a24b8832d149c3a6951089..413a83699eff2d0adbec0f279f2746cfd7ccdca2 100644 (file)
@@ -55,7 +55,11 @@ namespace creaImageIO
 
        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;
     
index 596a92a17492e963abea3cabcd061ccb084549e4..847160617de0cd275683427a047d9afcd8389a00 100644 (file)
@@ -331,9 +331,9 @@ namespace creaImageIO
     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();