]> Creatis software - bbtk.git/commitdiff
#3203 BBTK Feature New Normal vtk7itk4wx3-mingw64 vtk7itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 12:23:58 +0000 (14:23 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 12:23:58 +0000 (14:23 +0200)
kernel/src/bbtkConfigurationFile.cxx

index 69a1ffd188f3340267098f79e786e439148fa22e..e5b852945184c23a50ca9cd2aaa0b1e76b6af827 100644 (file)
@@ -379,13 +379,23 @@ namespace bbtk
 
     sprintf(copyFile,"copy %s\\bbtk_config.xml.tmp \"%s\"\\bbtk_config.xml ",bbtk_path,rootDirectory );
 
-    int attribs = GetFileAttributes (rootDirectory);
+       WCHAR    rootDirectory2[200];
+       MultiByteToWideChar( 0,0, rootDirectory, 200, rootDirectory2, 6);
+       LPCWSTR rootDirectory3 = rootDirectory2;
+       int attribs = GetFileAttributes (rootDirectory3);
+//    int attribs = GetFileAttributes (rootDirectory3);
+       
+       
     bbtkMessage("config",1,std::hex << attribs << " " << FILE_ATTRIBUTE_DIRECTORY << std::endl);
     if ( attribs != 0xFFFFFFFF)
     {
                if ((attribs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY ) /// \TODO : check !
                {       
-                       if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
+                       WCHAR    configPath2[200];
+                       MultiByteToWideChar( 0,0, configPath, 200, configPath2, 6);
+                       LPCWSTR configPath3 = configPath2;
+                       if ( GetFileAttributes( configPath3 ) == 0xFFFFFFFF)
+                       //if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
                        {
                                system(copyFile);
                        }