aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-02-19 13:51:40 +0000
committervaxerski <[email protected]>2023-02-19 13:51:40 +0000
commit0e5df91e3a1e7b7f7e00186cfee9c143b382f018 (patch)
treec55ba4e6a4642480f9575837451de1d4218243e6
parent38c25bb50d76409193db2438db60369f3868edf9 (diff)
downloadHyprland-0e5df91e3a1e7b7f7e00186cfee9c143b382f018.tar.gz
Hyprland-0e5df91e3a1e7b7f7e00186cfee9c143b382f018.zip
adjust crash report paths
-rw-r--r--src/debug/CrashReporter.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/debug/CrashReporter.cpp b/src/debug/CrashReporter.cpp
index 26e3938a..20e9b48e 100644
--- a/src/debug/CrashReporter.cpp
+++ b/src/debug/CrashReporter.cpp
@@ -34,7 +34,7 @@ void CrashReporter::createAndSaveCrash() {
std::string finalCrashReport = "";
- finalCrashReport += "--------------------------------------------\n Hyprland Crash Log\n--------------------------------------------\n";
+ finalCrashReport += "--------------------------------------------\n Hyprland Crash Report\n--------------------------------------------\n";
finalCrashReport += getRandomMessage() + "\n\n";
finalCrashReport += "Hyprland received signal 11 (SIGSEGV): Segmentation Fault\n\n";
@@ -85,7 +85,12 @@ void CrashReporter::createAndSaveCrash() {
if (!HOME)
return;
- std::ofstream ofs(std::string(HOME) + "/.hyprlandDump" + std::to_string(PID), std::ios::trunc);
+ if (!std::filesystem::exists(std::string(HOME) + "/.hyprland")) {
+ std::filesystem::create_directory(std::string(HOME) + "/.hyprland");
+ 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);
ofs << finalCrashReport;