mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-08 01:04: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);
|
c = tolower(c);
|
||||||
return ret;
|
return ret;
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user