mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
lstat() cleanup
This commit is contained in:
parent
688bd4fb50
commit
236d9ee7f7
8 changed files with 15 additions and 46 deletions
|
@ -663,9 +663,7 @@ void LocalStore::removeUnusedLinks(const GCState & state)
|
|||
if (name == "." || name == "..") continue;
|
||||
Path path = linksDir + "/" + name;
|
||||
|
||||
struct stat st;
|
||||
if (lstat(path.c_str(), &st) == -1)
|
||||
throw SysError("statting '%1%'", path);
|
||||
auto st = lstat(path);
|
||||
|
||||
if (st.st_nlink != 1) {
|
||||
actualSize += st.st_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue