mirror of
https://github.com/NixOS/nix.git
synced 2025-11-28 13:11:00 +01:00
listNar should just take the source accessor by simple reference
A shared pointer is not needed.
This commit is contained in:
parent
d17bfe3866
commit
ac36d74b66
6 changed files with 10 additions and 10 deletions
|
|
@ -208,7 +208,7 @@ ref<const ValidPathInfo> BinaryCacheStore::addToStoreCommon(
|
|||
if (config.writeNARListing) {
|
||||
nlohmann::json j = {
|
||||
{"version", 1},
|
||||
{"root", listNar(ref<SourceAccessor>(narAccessor), CanonPath::root, true)},
|
||||
{"root", listNar(*narAccessor, CanonPath::root, true)},
|
||||
};
|
||||
|
||||
upsertFile(std::string(info.path.hashPart()) + ".ls", j.dump(), "application/json");
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ ref<SourceAccessor> RemoteFSAccessor::addToCache(std::string_view hashPart, std:
|
|||
|
||||
if (cacheDir != "") {
|
||||
try {
|
||||
nlohmann::json j = listNar(narAccessor, CanonPath::root, true);
|
||||
nlohmann::json j = listNar(*narAccessor, CanonPath::root, true);
|
||||
writeFile(makeCacheFile(hashPart, "ls"), j.dump());
|
||||
} catch (...) {
|
||||
ignoreExceptionExceptInterrupt();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue