aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/make-content-addressed.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 17:09:58 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 17:09:58 -0500
commit7c822138134af3771dc017c7399507af4a25004f (patch)
tree167a6e9625177a63b4ea67db70de6d7dddcf9a79 /src/libstore/make-content-addressed.cc
parent81727f85cb567c4d5282c330d63a74ed84d12783 (diff)
parentb3d91239ae9f21a60057b278ceeff663fb786246 (diff)
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'src/libstore/make-content-addressed.cc')
-rw-r--r--src/libstore/make-content-addressed.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/make-content-addressed.cc b/src/libstore/make-content-addressed.cc
index 5d7945eb1..09f615439 100644
--- a/src/libstore/make-content-addressed.cc
+++ b/src/libstore/make-content-addressed.cc
@@ -28,8 +28,9 @@ std::map<StorePath, StorePath> makeContentAddressed(
StringMap rewrites;
StoreReferences refs;
- refs.self = oldInfo->references.self;
- for (auto & ref : oldInfo->references.others) {
+ for (auto & ref : oldInfo->references) {
+ if (ref == path)
+ refs.self = true;
auto i = remappings.find(ref);
auto replacement = i != remappings.end() ? i->second : ref;
// FIXME: warn about unremapped paths?