summaryrefslogtreecommitdiffstats
path: root/src/btop_tools.cpp
diff options
context:
space:
mode:
authorSteffen Winter <steffen.winter@proton.me>2023-10-23 15:18:28 +0200
committerSteffen Winter <steffen.winter@proton.me>2024-01-03 16:50:15 +0100
commitff8352fdcdc08d32494b5873bb85164f2054825a (patch)
tree0c44203561c4245f9f2f157e96121396c325744e /src/btop_tools.cpp
parent32b6622cec38aa6caa02111d76186195dcfbe95f (diff)
Improved error handling when determining the config directory
More verbose error printing when a directory is e.g. not readable Also allow the use of read only configurations with disabled logging and persistent configuration
Diffstat (limited to 'src/btop_tools.cpp')
-rw-r--r--src/btop_tools.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/btop_tools.cpp b/src/btop_tools.cpp
index e6ecbd8..967e2f1 100644
--- a/src/btop_tools.cpp
+++ b/src/btop_tools.cpp
@@ -669,6 +669,7 @@ namespace Logger {
lose_priv neutered{};
std::error_code ec;
try {
+ // NOTE: `exist()` could throw but since we return with an empty logfile we don't care
if (fs::exists(logfile) and fs::file_size(logfile, ec) > 1024 << 10 and not ec) {
auto old_log = logfile;
old_log += ".1";