From 438df9eca8a7026e74a1b9ec476622bf55bba294 Mon Sep 17 00:00:00 2001 From: drath Date: Sun, 5 Oct 2025 21:53:20 +0200 Subject: [PATCH] test --- src/utils.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 1de6b15..8558cd4 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -79,8 +79,9 @@ int get_val(const std::string& target, const std::string& content) { return result; } -std::string getFirstDir(std::string path) { - for (const auto& entry : std::filesystem::directory_iterator(path)) - return entry.path(); - return ""; +inline std::string getFirstDir(std::string_view path) { + // for (const auto& entry : std::filesystem::directory_iterator(path)) + // return entry.path(); + std::filesystem::directory_iterator(path)[0]; // can i just do that + // return ""; }