1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-29 13:41:00 +01:00

Store a ref to InputAccessor in SourcePath

This commit is contained in:
Eelco Dolstra 2022-07-06 17:25:15 +02:00
parent 72dffd6c6c
commit a18b3c665a
14 changed files with 44 additions and 31 deletions

View file

@ -415,7 +415,10 @@ public:
SourcePath path() const
{
assert(internalType == tPath);
return SourcePath { .accessor = *_path.accessor, .path = CanonPath(CanonPath::unchecked_t(), _path.path) };
return SourcePath {
.accessor = ref(_path.accessor->shared_from_this()),
.path = CanonPath(CanonPath::unchecked_t(), _path.path)
};
}
std::string_view str() const