Skip to content

Commit

Permalink
Fix file search bug in Directory class
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryKogan committed Dec 4, 2023
1 parent 02316c2 commit 7dcc133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FileSystem/Directory/Directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ auto Directory::files() const -> std::vector<FileData> { return files_; }

auto Directory::find(std::string const &name) const -> std::optional<FileData> {
for (auto const &file : files_) {
if (file.name().length() == name.length()) { return file; }
if (file.name() == name) { return file; }
}
return {};
}
Expand Down

0 comments on commit 7dcc133

Please sign in to comment.