Files
packages/admin/btop/patches/001-move-log-to-tmpfs.patch
XCas13 7c3e376967 btop: patch to move the log file to tmpfs
The log file path is hardcoded as $HOME/.local/state/btop.log, i.e. to the router’s flash storage rather than to tmpfs. This patch sets the log file path to /tmp/log/btop.log

Signed-off-by: XCas13 <xcas13@gmail.com>
2026-02-21 17:50:02 +02:00

15 lines
467 B
Diff

--- a/src/btop_config.cpp
+++ b/src/btop_config.cpp
@@ -800,10 +800,7 @@ namespace Config {
if (xdg_state_home_ptr != nullptr) {
xdg_state_home = std::make_optional(fs::path(xdg_state_home_ptr));
} else {
- const auto* home_ptr = std::getenv("HOME");
- if (home_ptr != nullptr) {
- xdg_state_home = std::make_optional(fs::path(home_ptr) / ".local" / "state");
- }
+ xdg_state_home = std::make_optional(fs::path("/tmp/log"));
}
}