#include <boost/filesystem/operations.hpp>
#include <boost/utility.hpp>
-
+#include <creaImageIOGimmick.h>
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
namespace fs = boost::filesystem;
using boost::filesystem::path;
using boost::next;
unsigned int nbf = filenames.size();
std::vector<std::string>::const_iterator i;
+ mSynchronizer->GetList();
for (i=filenames.begin();i!=filenames.end();++i)
{
if (IsHandledFile(*i))
{
mProgress.IncNumberHandledFiles();
- mSynchronizer->InsertAddOp((*i),"0","1",mCurrentDB);
- std::string addKey=mSynchronizer->GetAttribute("ADD_KEY","ADD_OPS","PATH",(*i),mCurrentDB);
- std::stringstream removedOn;
- removedOn<<time(0);
- mSynchronizer->InsertIgnoreFile(addKey,(*i),"0",removedOn.str(),mCurrentDB);
- AddFile(*i);
+ if(mSynchronizer->isIndexed(*i))
+ {
+ mSynchronizer->InsertAddOp((*i),"0","1",mCurrentDB);
+ std::string addKey=mSynchronizer->GetAttribute("ADD_KEY","ADD_OPS","PATH",(*i),mCurrentDB);
+ std::stringstream removedOn;
+ removedOn<<time(0);
+ mSynchronizer->InsertIgnoreFile(addKey,(*i),"0",removedOn.str(),mCurrentDB);
+ AddFile(*i);
+ }
}
mProgressSignal(mProgress);
if (mProgress.GetStop()) break;