mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Reapply "Merge pull request #13938 from NixOS/import-thunk"
This reverts commit fd034814dc.
This commit is contained in:
parent
ab7feb3898
commit
5f60602875
9 changed files with 135 additions and 88 deletions
|
|
@ -95,9 +95,7 @@ std::optional<struct stat> PosixSourceAccessor::cachedLstat(const CanonPath & pa
|
|||
// former is not hashable on libc++.
|
||||
Path absPath = makeAbsPath(path).string();
|
||||
|
||||
std::optional<Cache::mapped_type> res;
|
||||
cache.cvisit(absPath, [&](auto & x) { res.emplace(x.second); });
|
||||
if (res)
|
||||
if (auto res = getConcurrent(cache, absPath))
|
||||
return *res;
|
||||
|
||||
auto st = nix::maybeLstat(absPath.c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue