mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-07 16:54:54 +00:00
always use complete path as index lookup
This commit is contained in:
parent
d3a3bcef34
commit
e2a4a5ff48
12
src/utils.cc
12
src/utils.cc
@ -113,7 +113,17 @@ std::string LowerPathIfInsensitive(const std::string &path) {
|
||||
c = tolower(c);
|
||||
return ret;
|
||||
#else
|
||||
return path;
|
||||
// use this opportunity to get full path
|
||||
char *rpbuf = NULL;
|
||||
std::string fullpath;
|
||||
rpbuf = realpath(path.c_str(), NULL);
|
||||
if (rpbuf != NULL) {
|
||||
fullpath = rpbuf;
|
||||
free(rpbuf);
|
||||
} else {
|
||||
fullpath = path;
|
||||
}
|
||||
return fullpath;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user