use .txt for crash reports

This commit is contained in:
Vaxry 2023-03-01 09:32:31 +00:00
parent 50a4a74b4e
commit 0905515c40
2 changed files with 28 additions and 29 deletions

View file

@ -59,7 +59,7 @@ coredumpctl info [PID]
where `[PID]` is the PID you remembered. where `[PID]` is the PID you remembered.
## Obtaining the Hyprland Crash Report (v0.22.0beta and up) ## Obtaining the Hyprland Crash Report (v0.22.0beta and up)
Go to `~/.hyprland/` and you should find a file named `.hyprlandCrashReport[XXXX]` where `[XXXX]` is the PID of the process that crashed. Go to `~/.hyprland/` and you should find a file named `hyprlandCrashReport[XXXX].txt` where `[XXXX]` is the PID of the process that crashed.
If you do not see it, make sure you have "show hidden files" enabled in your file manager. If you do not see it, make sure you have "show hidden files" enabled in your file manager.

View file

@ -10,7 +10,6 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
std::string getRandomMessage() { std::string getRandomMessage() {
const std::vector<std::string> MESSAGES = {"Sorry, didn't mean to...", const std::vector<std::string> MESSAGES = {"Sorry, didn't mean to...",
@ -132,7 +131,7 @@ void CrashReporter::createAndSaveCrash() {
std::filesystem::permissions(std::string(HOME) + "/.hyprland", std::filesystem::perms::all, std::filesystem::perm_options::replace); std::filesystem::permissions(std::string(HOME) + "/.hyprland", std::filesystem::perms::all, std::filesystem::perm_options::replace);
} }
std::ofstream ofs(std::string(HOME) + "/.hyprland/.hyprlandCrashReport" + std::to_string(PID), std::ios::trunc); std::ofstream ofs(std::string(HOME) + "/.hyprland/hyprlandCrashReport" + std::to_string(PID) + ".txt", std::ios::trunc);
ofs << finalCrashReport; ofs << finalCrashReport;