aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2022-12-12 16:26:10 -0500
committerGitHub <noreply@github.com>2022-12-12 16:26:10 -0500
commitdc075dcdd0306adec911ec8d898b723f464f7c0a (patch)
tree7efc67f51d3e56a910ac188d16bde827c4e26884 /src/libstore
parent1879c7c95e14ffcda30810747f28f422f56a63e2 (diff)
Apply suggestions from code review
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derived-path.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/derived-path.cc b/src/libstore/derived-path.cc
index 7fe797aa1..05c2303db 100644
--- a/src/libstore/derived-path.cc
+++ b/src/libstore/derived-path.cc
@@ -93,7 +93,7 @@ DerivedPath::Built DerivedPath::Built::parse(const Store & store, std::string_vi
DerivedPath DerivedPath::parse(const Store & store, std::string_view s)
{
- size_t n = s.rfind("!");
+ size_t n = s.find("!");
return n == s.npos
? (DerivedPath) DerivedPath::Opaque::parse(store, s)
: (DerivedPath) DerivedPath::Built::parse(store, s.substr(0, n), s.substr(n + 1));