about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/derivations.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/derivations.cc')
-rw-r--r--third_party/nix/src/libstore/derivations.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc
index 8a50f3c85b..978d39b94e 100644
--- a/third_party/nix/src/libstore/derivations.cc
+++ b/third_party/nix/src/libstore/derivations.cc
@@ -408,15 +408,15 @@ Hash hashDerivationModulo(Store& store, Derivation drv) {
   return hashString(htSHA256, drv.unparse());
 }
 
-// TODO(tazjin): doc comment?
 DrvPathWithOutputs parseDrvPathWithOutputs(absl::string_view path) {
   auto pos = path.find('!');
   if (pos == absl::string_view::npos) {
     return DrvPathWithOutputs(path, std::set<std::string>());
   }
 
-  return DrvPathWithOutputs(path.substr(pos + 1),
-                            absl::StrSplit(path, absl::ByChar(',')));
+  return DrvPathWithOutputs(
+      path.substr(0, pos),
+      absl::StrSplit(path.substr(pos + 1), absl::ByChar(',')));
 }
 
 Path makeDrvPathWithOutputs(const Path& drvPath,