Skip to content

Commit

Permalink
fix read names in directory method
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Bauer <[email protected]>
  • Loading branch information
IgnoreWarnings committed Oct 9, 2024
1 parent a5bb0ce commit 998cd74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/include/villas/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ template <class... Ts> struct overloaded : Ts... {
template <class... Ts> overloaded(Ts...) -> overloaded<Ts...>;

void write_to_file(std::string data, const std::filesystem::path file);
std::vector<std::string> read_names_in_directory(const std::string &name);
std::vector<std::string> read_names_in_directory(const std::filesystem::path &directory);

namespace base64 {

Expand Down
4 changes: 2 additions & 2 deletions common/lib/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ void write_to_file(std::string data, const std::filesystem::path file) {
}

std::vector<std::string>
read_names_in_directory(const std::filesystem::path &dir_path) {
read_names_in_directory(const std::filesystem::path &directory) {
std::vector<std::string> names;
for (auto const &dir_entry : std::filesystem::directory_iterator{dir_path}) {
for (auto const &dir_entry : std::filesystem::directory_iterator{directory}) {
names.push_back(dir_entry.path().filename());
}
return names;
Expand Down

0 comments on commit 998cd74

Please sign in to comment.