mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Fix find_dominating_file() for ghc::filesystem
"/".parent() now is "/" instead of "" (which does make more sense)
This commit is contained in:
+1
-1
@@ -310,7 +310,7 @@ std::optional<ghc::filesystem::path> find_dominating_file(
|
|||||||
const std::string& filename,
|
const std::string& filename,
|
||||||
ghc::filesystem::path starting_dir,
|
ghc::filesystem::path starting_dir,
|
||||||
F&& predicate = ghc::filesystem::exists) {
|
F&& predicate = ghc::filesystem::exists) {
|
||||||
while (starting_dir != "") {
|
while (starting_dir != "/") {
|
||||||
const ghc::filesystem::path candidate = starting_dir / filename;
|
const ghc::filesystem::path candidate = starting_dir / filename;
|
||||||
if (predicate(candidate)) {
|
if (predicate(candidate)) {
|
||||||
return candidate;
|
return candidate;
|
||||||
|
|||||||
Reference in New Issue
Block a user