logic: allow the user to discard an aborted indexer run

* keep old database on filesystem while indexing
* migrate old ".coatiproject" settings to new ".srctrlprj" extension when loading project
* send new errors in MessageErrorCountUpdate after injecting
* recheck filepath exist() in FileSystem's remove, rename, copy and create functions
* updated tasks to new "override" policy
This commit is contained in:
mlangkabel
2018-07-03 18:54:53 +02:00
parent c8a885be83
commit a1dd1a77c9
41 changed files with 434 additions and 215 deletions
+10 -4
View File
@@ -203,45 +203,51 @@ TimeStamp FileSystem::getLastWriteTime(const FilePath& filePath)
bool FileSystem::remove(const FilePath& path)
{
return boost::filesystem::remove(path.getPath());
const bool ret = boost::filesystem::remove(path.getPath());
path.recheckExists();
return ret;
}
bool FileSystem::rename(const FilePath& from, const FilePath& to)
{
if (!from.exists() || to.exists())
if (!from.recheckExists() || to.recheckExists())
{
return false;
}
boost::filesystem::rename(from.getPath(), to.getPath());
to.recheckExists();
return true;
}
bool FileSystem::copyFile(const FilePath& from, const FilePath& to)
{
if (!from.exists() || to.exists())
if (!from.recheckExists() || to.recheckExists())
{
return false;
}
boost::filesystem::copy_file(from.getPath(), to.getPath());
to.recheckExists();
return true;
}
bool FileSystem::copy_directory(const FilePath& from, const FilePath& to)
{
if (!from.exists() || to.exists())
if (!from.recheckExists() || to.recheckExists())
{
return false;
}
boost::filesystem::copy_directory(from.getPath(), to.getPath());
to.recheckExists();
return true;
}
void FileSystem::createDirectory(const FilePath& path)
{
boost::filesystem::create_directories(path.str());
path.recheckExists();
}
std::vector<FilePath> FileSystem::getDirectSubDirectories(const FilePath& path)