diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-12-21 22:18:07 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-12-21 22:18:07 +0100 |
| commit | bc51a91043a6405834854d8a13e8e8ac45ea5737 (patch) | |
| tree | 99ec191e2f74d9d646fa2ad1779fc7be24e1f82e /src/debug/CrashReporter.cpp | |
| parent | 698f3b65765fc4b0cae0592f65663c70e593898d (diff) | |
crashreporter: don't explicitly set 777 on crash report directory
fixes #4218
Diffstat (limited to 'src/debug/CrashReporter.cpp')
| -rw-r--r-- | src/debug/CrashReporter.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/debug/CrashReporter.cpp b/src/debug/CrashReporter.cpp index ff2a5191..65b31399 100644 --- a/src/debug/CrashReporter.cpp +++ b/src/debug/CrashReporter.cpp @@ -130,19 +130,15 @@ void CrashReporter::createAndSaveCrash(int sig) { std::ofstream ofs; std::string path; if (!CACHE_HOME || std::string(CACHE_HOME).empty()) { - if (!std::filesystem::exists(std::string(HOME) + "/.hyprland")) { + 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); - } path = std::string(HOME) + "/.hyprland/hyprlandCrashReport" + std::to_string(PID) + ".txt"; ofs.open(path, std::ios::trunc); } else { - if (!std::filesystem::exists(std::string(CACHE_HOME) + "/hyprland")) { + if (!std::filesystem::exists(std::string(CACHE_HOME) + "/hyprland")) std::filesystem::create_directory(std::string(CACHE_HOME) + "/hyprland"); - std::filesystem::permissions(std::string(CACHE_HOME) + "/hyprland", std::filesystem::perms::all, std::filesystem::perm_options::replace); - } path = std::string(CACHE_HOME) + "/hyprland/hyprlandCrashReport" + std::to_string(PID) + ".txt"; ofs.open(path, std::ios::trunc); |
