mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-06 16:24:54 +00:00
fix sys::path::remove_dots(path, /*remove_dot_dot=*/true);
This commit is contained in:
parent
98dd9fd434
commit
56fb3c30c5
@ -6,6 +6,7 @@
|
||||
#include "config.hh"
|
||||
#include "platform.hh"
|
||||
|
||||
#include <filesystem>
|
||||
#include <clang/AST/Type.h>
|
||||
#include <clang/Driver/Action.h>
|
||||
#include <clang/Driver/Compilation.h>
|
||||
@ -33,6 +34,7 @@ std::string pathFromFileEntry(const FileEntry &file) {
|
||||
std::string ret(path.str());
|
||||
if (checkFolder(ret))
|
||||
return ret;
|
||||
ret = std::filesystem::exists(ret)? ret: file.tryGetRealPathName().str();
|
||||
// Resolve symlinks outside of workspace folders, e.g. /usr/include/c++/7.3.0
|
||||
return normalizeFolder(ret) ? ret : realPath(ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user