mirror of
https://github.com/NixOS/nix
synced 2025-07-05 12:21:48 +02:00
Make sure references are empty for store path replacing
also copy info2 instead of casting
This commit is contained in:
parent
8974755d19
commit
be50de1142
3 changed files with 6 additions and 6 deletions
|
@ -4437,8 +4437,8 @@ void SubstitutionGoal::tryNext()
|
|||
}
|
||||
|
||||
if (info->path != storePath) {
|
||||
if (info->isContentAddressed(*sub)) {
|
||||
auto info2 = std::const_pointer_cast<ValidPathInfo>(std::shared_ptr<const ValidPathInfo>(info));
|
||||
if (info->isContentAddressed(*sub) && info->references.empty()) {
|
||||
auto info2 = std::make_shared<ValidPathInfo>(*info);
|
||||
info2->path = storePath;
|
||||
info = info2;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue