From 1641fb2996c39c1cbc7dcaf3b1cf30a83fcdaf26 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 11 Apr 2022 15:03:35 +0200 Subject: [PATCH] Fix find_dominating_file() for ghc::filesystem "/".parent() now is "/" instead of "" (which does make more sense) --- src/plugin/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin/utils.h b/src/plugin/utils.h index 7c2dec55..d7717ec1 100644 --- a/src/plugin/utils.h +++ b/src/plugin/utils.h @@ -310,7 +310,7 @@ std::optional 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;