1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

Remove FSAccessor::Type::tMissing

Instead stat() now returns std::nullopt to denote that the file
doesn't exist.
This commit is contained in:
Eelco Dolstra 2023-11-01 14:36:40 +01:00
parent e3febfcd53
commit b2ac6fc040
10 changed files with 77 additions and 74 deletions

View file

@ -101,7 +101,7 @@ std::pair<ref<FSAccessor>, Path> RemoteFSAccessor::fetch(const Path & path_, boo
return {addToCache(storePath.hashPart(), std::move(sink.s)), restPath};
}
FSAccessor::Stat RemoteFSAccessor::stat(const Path & path)
std::optional<FSAccessor::Stat> RemoteFSAccessor::stat(const Path & path)
{
auto res = fetch(path);
return res.first->stat(res.second);