bt: Fix generation of click-able links for source files.

When the default build location was moved from /Build to the new
architecture specific directory, /Build/i686, this code broke.
All file names are now path relative one additional level up.

So continue the hack, and introduce another dummy directory to
make the relative paths resolve correctly.
This commit is contained in:
Brian Gianforcaro 2021-04-30 21:45:54 -07:00 committed by Linus Groh
parent 69e2431c64
commit f1c98dc5ea
Notes: sideshowbarker 2024-07-18 18:50:43 +09:00

View file

@ -67,7 +67,7 @@ int main(int argc, char** argv)
// See if we can find the sources in /usr/src
// FIXME: I'm sure this can be improved!
auto full_path = LexicalPath::canonicalized_path(String::formatted("/usr/src/serenity/dummy/{}", symbol.filename));
auto full_path = LexicalPath::canonicalized_path(String::formatted("/usr/src/serenity/dummy/dummy/{}", symbol.filename));
if (access(full_path.characters(), F_OK) == 0) {
linked = true;
out("\033]8;;file://{}{}?line_number={}\033\\", hostname, full_path, symbol.line_number);