always use complete path as index lookup

This commit is contained in:
Scott Corley 2019-03-04 20:56:27 -06:00
parent d3a3bcef34
commit e2a4a5ff48

View File

@ -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
}