#endif
sizeStrVec = mPackage_paths.size();
- for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
+ for (iStrVec=0 ; iStrVec<sizeStrVec ; iStrVec++)
+ {
Utilities::replace( mPackage_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
- }
+ } // for iStrVec
GetHelp(2);
Utilities::replace( configXmlFullPathName , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
if ( Utilities::FileExists( configXmlFullPathName ))
- {
- bbtkMessage("config",1, "ConfigurationFile : [" << configXmlFullPathName <<
- "] found in current directory" << std::endl);
- //Read(configXmlFullPathName.c_str());
- // traiter le fichier local
- }
-
- // ==> Then we look for bbtk_config.xml in ".bbtk"
- else
- {
- configXmlFullPathName = Utilities::MakeUserSettingsFullFileName("bbtk_config.xml");
- if (!Utilities::FileExists( configXmlFullPathName ))
- {
- // ==> Nothing found, we create bbtk_config.xml in ".bbtk"
- InstallPath ();
- }
- }
+ {
+ bbtkMessage("config",1, "ConfigurationFile : [" << configXmlFullPathName <<
+ "] found in current directory" << std::endl);
+ //Read(configXmlFullPathName.c_str());
+ // traiter le fichier local
+ } else { // ==> Then we look for bbtk_config.xml in ".bbtk"
+ configXmlFullPathName = Utilities::MakeUserSettingsFullFileName("bbtk_config.xml");
+ if (!Utilities::FileExists( configXmlFullPathName ))
+ {
+ // ==> Nothing found, we create bbtk_config.xml in ".bbtk"
+ InstallPath ();
+ }
+ }
// In any case, deal with bbtk_config.xml!
Read(configXmlFullPathName.c_str());
//=========================================================================
void ConfigurationFile::InstallPath ()
{
-
/*--------------------------------------------------
New policy for bbtk_config.xml :
system(copyFile);
} // FileExists configPath
} // FileExists configXmlTmp
+
return;
// ------------------------------------------------------------------
XMLNode::parseFile((XMLCSTR)Get_config_xml_full_path().c_str(),
(XMLCSTR)"config",res);
- if ( res->error != eXMLErrorNone )
+ if ( res->error != eXMLErrorNone )
{
std::string mess = GetErrorMessage(res,Get_config_xml_full_path());
delete res;
#ifdef _WIN32
#endif
-
XMLError err = BB.writeToFile((XMLCSTR)Get_config_xml_full_path().c_str());
if ( err != eXMLErrorNone )
- {
- std::string mess = GetErrorMessage(res,Get_config_xml_full_path());
- bbtkDebugMessage("config",1,mess<< std::endl);
- bbtkError(mess);
- }
-
+ {
+ std::string mess = GetErrorMessage(res,Get_config_xml_full_path());
+ bbtkDebugMessage("config",1,mess<< std::endl);
+ bbtkError(mess);
+ } // if err
return true;
}
//=========================================================================