mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Make more URLs parsed, most notably FileTransferRequest::url
Trying to gradually replace the use of strings with better types in ways that makes sense.
This commit is contained in:
parent
72a548ed6a
commit
3e86d75c9d
12 changed files with 35 additions and 32 deletions
|
|
@ -166,10 +166,10 @@ protected:
|
|||
`std::filesystem::path`'s equivalent operator, which properly
|
||||
combines the the URLs, whether the right is relative or
|
||||
absolute. */
|
||||
return FileTransferRequest(
|
||||
return FileTransferRequest(parseURL(
|
||||
hasPrefix(path, "https://") || hasPrefix(path, "http://") || hasPrefix(path, "file://")
|
||||
? path
|
||||
: config->cacheUri.to_string() + "/" + path);
|
||||
: config->cacheUri.to_string() + "/" + path));
|
||||
}
|
||||
|
||||
void getFile(const std::string & path, Sink & sink) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue