diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-09-29 23:42:43 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-09-29 23:42:43 +0200 |
commit | 76f000712ed3aa8f258d68fc5ef036f1255dfada (patch) | |
tree | 7f68caf85244b2d289d6e8a4a28ebb5bc664a5e3 /src/libexpr/flake/flakeref.cc | |
parent | 64e9b3c83b7cf7f3c7348426666ccca2ca395d28 (diff) | |
parent | cb186f1e7536c9448455bfbf8dec16ad6600e88e (diff) |
Merge branch 'kwq/path-dir-query' of https://github.com/kquick/nix
Diffstat (limited to 'src/libexpr/flake/flakeref.cc')
-rw-r--r-- | src/libexpr/flake/flakeref.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc index 87b202643..833e8a776 100644 --- a/src/libexpr/flake/flakeref.cc +++ b/src/libexpr/flake/flakeref.cc @@ -157,7 +157,8 @@ std::pair<FlakeRef, std::string> parseFlakeRefWithFragment( } else { if (!hasPrefix(path, "/")) throw BadURL("flake reference '%s' is not an absolute path", url); - path = canonPath(path); + auto query = decodeQuery(match[2]); + path = canonPath(path + "/" + get(query, "dir").value_or("")); } fetchers::Attrs attrs; |