fix index error when there is a soft link file

This commit is contained in:
lenajin 2020-05-29 12:00:10 +08:00
parent c5acf62060
commit 98d1208477

View File

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