1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Simplify printed file paths in the Linux/*BSD crash handler

This shortens the printed paths a bit when they would contain `/./`,
which is redundant (e.g. `/opt/godot/./core` becomes `/opt/godot/core`).
This commit is contained in:
Hugo Locurcio
2024-08-18 23:35:12 +02:00
parent 1bd740d18d
commit 57141e04a6

View File

@@ -133,7 +133,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); free(strings);