Interpret all file:// URIs as Git repositories

This commit is contained in:
Eelco Dolstra 2019-02-12 22:06:19 +01:00
parent beab05851b
commit e38ec77de8
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -79,7 +79,9 @@ FlakeRef::FlakeRef(const std::string & uri)
data = d; data = d;
} }
else if (std::regex_match(uri.c_str(), match, uriRegex) && hasSuffix(match[4], ".git")) { else if (std::regex_match(uri.c_str(), match, uriRegex)
&& (match[2] == "file" || hasSuffix(match[4], ".git")))
{
IsGit d; IsGit d;
d.uri = match[1]; d.uri = match[1];
for (auto & param : tokenizeString<Strings>(match[5], "&")) { for (auto & param : tokenizeString<Strings>(match[5], "&")) {