remove call to boost::filesystem::canonical when preparing indexer (issue #1149) (#1151)

boost::filesystem::canonical causes issues on Windows and will throw an exception if path is too long. Now those paths will be ignored by the indexer because boost::filesystem::exists returns false.
This commit is contained in:
Malte Langkabel
2021-02-25 07:38:01 +01:00
committed by GitHub
parent 5a2b0fd591
commit 7cb232af86
2 changed files with 10 additions and 10 deletions
+3 -2
View File
@@ -19,7 +19,7 @@ bool isInFileInfos(const std::vector<FileInfo>& infos, const std::wstring& filen
{
for (const FileInfo& info: infos)
{
if (info.path.wstr() == filename)
if (info.path.getAbsolute().wstr() == FilePath(filename).getCanonical().wstr())
{
return true;
}
@@ -33,7 +33,8 @@ bool isInFileInfos(
{
for (const FileInfo& info: infos)
{
if (info.path.wstr() == filename || info.path.wstr() == filename2)
if (info.path.wstr() == FilePath(filename).getCanonical().wstr() ||
info.path.wstr() == FilePath(filename2).getCanonical().wstr())
{
return true;
}