From 4eb2012a8d51625faf3039ca8eeec33455a8b165 Mon Sep 17 00:00:00 2001 From: Kostas Kyrimis Date: Thu, 6 Jul 2023 19:26:37 +0300 Subject: [PATCH] fix: add missing slash on startup for certain log_dir paths (#1500) --- src/server/dfly_main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/dfly_main.cc b/src/server/dfly_main.cc index c719baf88..989789990 100644 --- a/src/server/dfly_main.cc +++ b/src/server/dfly_main.cc @@ -622,7 +622,8 @@ void sigill_hdlr(int signo) { void PrintBasicUsageInfo() { std::cout << "* Logs will be written to the first available of the following paths:\n"; for (const auto& dir : google::GetLoggingDirectories()) { - std::cout << dir << "dragonfly.*\n"; + const string_view maybe_slash = absl::EndsWith(dir, "/") ? "" : "/"; + std::cout << dir << maybe_slash << "dragonfly.*\n"; } std::cout << "* For the available flags type dragonfly [--help | --helpfull]\n"; std::cout << "* Documentation can be found at: https://www.dragonflydb.io/docs";