Fix find_dominating_file() for ghc::filesystem

"/".parent() now is "/" instead of "" (which does make more sense)
This commit is contained in:
Robbert van der Helm
2022-04-11 15:03:35 +02:00
parent a324042695
commit 1641fb2996
+1 -1
View File
@@ -310,7 +310,7 @@ std::optional<ghc::filesystem::path> find_dominating_file(
const std::string& filename,
ghc::filesystem::path starting_dir,
F&& predicate = ghc::filesystem::exists) {
while (starting_dir != "") {
while (starting_dir != "/") {
const ghc::filesystem::path candidate = starting_dir / filename;
if (predicate(candidate)) {
return candidate;