Merge pull request #4831 from matthewbauer/fix-extra-slash-in-canon-path

Fix extra slash in canonPath output
This commit is contained in:
Eelco Dolstra 2021-05-19 11:10:43 +02:00 committed by GitHub
commit 7234cf39be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,9 @@ Path canonPath(const Path & path, bool resolveSymlinks)
s.clear(); /* restart for symlinks pointing to absolute path */
} else {
s = dirOf(s);
if (s == "/") { // we dont want trailing slashes here, which dirOf only produces if s = /
s.clear();
}
}
}
}