Skip to content

Commit aee668e

Browse files
committed
absolute paths
1 parent 8883ced commit aee668e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/errorlogger.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,10 @@ void ErrorMessage::calculateWarningHashFromLocations()
327327
// used. Instead hash the id, message and all filenames/notes in the callstack.
328328
std::string hashString = id + '\n' + mShortMessage;
329329
for (const FileLocation &loc : callStack) {
330-
hashString += '\n' + loc.getfile(false) + '\n' + loc.getinfo();
330+
std::string fileName = loc.getfile(false);
331+
if (Path::isAbsolute(fileName))
332+
fileName = fileName.substr(fileName.rfind('/') + 1);
333+
hashString += '\n' + fileName + '\n' + loc.getinfo();
331334
}
332335

333336
// hash algorithm: sdbm

0 commit comments

Comments
 (0)