X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOSynchron.cpp;h=06785fe8e94bc32d55335409f95fea662b040920;hb=66b7c66deb6102bd632daf96fe298b1d5764b7cc;hp=0748a861351066682f3336f1fee4dd54672f1c47;hpb=e13ea6551e8721b11998dc33ddccf3f89458f173;p=creaImageIO.git diff --git a/src2/creaImageIOSynchron.cpp b/src2/creaImageIOSynchron.cpp index 0748a86..06785fe 100644 --- a/src2/creaImageIOSynchron.cpp +++ b/src2/creaImageIOSynchron.cpp @@ -1,8 +1,9 @@ #include #include #include +#include +//namespace fs = boost::filesystem; -namespace fs = boost::filesystem; //===================================================================== @@ -52,7 +53,7 @@ namespace creaImageIO //===================================================================== void Synchronizer::Initialize() { - if (!fs::exists(pathDB)) + if (!boost::filesystem::exists(pathDB)) { CreateDB(); } @@ -405,10 +406,12 @@ namespace creaImageIO bool Synchronizer::isIndexed(const std::string filename) { bool valid = true; + std::string name(filename); + boost::algorithm::replace_all( name,"\\" , "/"); std::map ::iterator it_list = mList.begin(); for(;it_list != mList.end(); it_list++) { - if(it_list->first == filename) + if(it_list->first == name) { valid = false; break;