mirror of
https://github.com/NixOS/nix
synced 2025-07-03 06:11:46 +02:00
SourceAccessor: Change the main interface from lstat() to maybeLstat()
This commit is contained in:
parent
8ffd1695ce
commit
cdb27c1519
9 changed files with 22 additions and 20 deletions
|
@ -36,11 +36,11 @@ struct FSInputAccessorImpl : FSInputAccessor, PosixSourceAccessor
|
|||
return isAllowed(absPath) && PosixSourceAccessor::pathExists(absPath);
|
||||
}
|
||||
|
||||
Stat lstat(const CanonPath & path) override
|
||||
std::optional<Stat> maybeLstat(const CanonPath & path) override
|
||||
{
|
||||
auto absPath = makeAbsPath(path);
|
||||
checkAllowed(absPath);
|
||||
return PosixSourceAccessor::lstat(absPath);
|
||||
return PosixSourceAccessor::maybeLstat(absPath);
|
||||
}
|
||||
|
||||
DirEntries readDirectory(const CanonPath & path) override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue