Merge pull request #2895 from CSVdB/fixRelativePaths

Fixed relative path parsing
This commit is contained in:
Eelco Dolstra 2019-05-28 10:24:43 +02:00 committed by GitHub
commit 2950014535
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,7 @@ FlakeRef::FlakeRef(const std::string & uri, bool allowRelative)
data = d;
}
else if (hasPrefix(uri, "/") || (allowRelative && (hasPrefix(uri, "./") || uri == "."))) {
else if (hasPrefix(uri, "/") || (allowRelative && (hasPrefix(uri, "./") || hasPrefix(uri, "../") || uri == "."))) {
IsPath d;
d.path = allowRelative ? absPath(uri) : canonPath(uri);
data = d;