Merge pull request #95776 from Calinou/crash-handler-linuxbsd-simplify-file-path

Simplify the printed file paths in the Linux/*BSD crash handler
This commit is contained in:
Thaddeus Crews 2025-03-07 15:12:10 -06:00
commit dadfcd1ff2
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -137,7 +137,8 @@ static void handle_crash(int sig) {
}
}
print_error(vformat("[%d] %s (%s)", (int64_t)i, fname, err == OK ? addr2line_results[i] : ""));
// Simplify printed file paths to remove redundant `/./` sections (e.g. `/opt/godot/./core` -> `/opt/godot/core`).
print_error(vformat("[%d] %s (%s)", (int64_t)i, fname, err == OK ? addr2line_results[i].replace("/./", "/") : ""));
}
free(strings);