fix index error when there is a soft link file (https://github.com/MaskRay/ccls/issues/639)

This commit is contained in:
Abbyyan 2020-05-26 17:11:23 +08:00
parent c5acf62060
commit fe14706742

View File

@ -6,6 +6,7 @@
#include "log.hh"
#include <rapidjson/document.h>
#include <filesystem>
#include <algorithm>
#include <stdio.h>
@ -120,6 +121,7 @@ std::string DocumentUri::getPath() const {
#endif
if (g_config)
normalizeFolder(ret);
ret = std::filesystem::canonical(ret);
return ret;
}