From c12b0aa2c71371059525caf912ffc57b6f4372c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20Kocao=C4=9Flu?= Date: Sat, 24 Aug 2024 09:52:50 +0300 Subject: [PATCH] pathfinder: don't add trailing slash to entries flagged for wordexp when listing --- src/cpp/project/pathfinder/src/db.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpp/project/pathfinder/src/db.cpp b/src/cpp/project/pathfinder/src/db.cpp index 09d9658b..e621701a 100644 --- a/src/cpp/project/pathfinder/src/db.cpp +++ b/src/cpp/project/pathfinder/src/db.cpp @@ -155,7 +155,8 @@ namespace paf { ::simpslashbuf(path.c_str(), data); std::cout << kc << sep << data; - if (type == db_type::directory && !path.ends_with('/')) + if (!(flags & static_cast(db_flag::wordexp)) && + type == db_type::directory && !path.ends_with('/')) std::cout << '/'; std::cout << end; }