Skip to content

Commit

Permalink
pathfinder: don't add trailing slash to entries flagged for wordexp w…
Browse files Browse the repository at this point in the history
…hen listing
  • Loading branch information
XPhyro committed Aug 24, 2024
1 parent 780b46b commit c12b0aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/project/pathfinder/src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_flags_t>(db_flag::wordexp)) &&
type == db_type::directory && !path.ends_with('/'))
std::cout << '/';
std::cout << end;
}
Expand Down

0 comments on commit c12b0aa

Please sign in to comment.