mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Make completeDir follow symlinks
Allows completing `nix why-depends /run/cur<Tab>` to /run/current-system
This commit is contained in:
parent
a6d7cd4183
commit
5461ff532d
3 changed files with 11 additions and 1 deletions
|
@ -215,6 +215,15 @@ bool isDirOrInDir(std::string_view path, std::string_view dir)
|
|||
}
|
||||
|
||||
|
||||
struct stat stat(const Path & path)
|
||||
{
|
||||
struct stat st;
|
||||
if (stat(path.c_str(), &st))
|
||||
throw SysError("getting status of '%1%'", path);
|
||||
return st;
|
||||
}
|
||||
|
||||
|
||||
struct stat lstat(const Path & path)
|
||||
{
|
||||
struct stat st;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue