From e2a4a5ff482a5d277eb392fe02313a23c36d1e1c Mon Sep 17 00:00:00 2001 From: Scott Corley Date: Mon, 4 Mar 2019 20:56:27 -0600 Subject: [PATCH] always use complete path as index lookup --- src/utils.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/utils.cc b/src/utils.cc index f37ac58e..abc85656 100644 --- a/src/utils.cc +++ b/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 }