diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-09-23 19:17:28 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-09-23 19:17:28 +0200 |
commit | 236d9ee7f72ca4238f5f44c244fd2b885691c6ad (patch) | |
tree | f5dc04851c9788ac7bb8802787a3eae7857eadf5 /src/libstore/gc.cc | |
parent | 688bd4fb500c70cda4ffe6864bbf59dbc4da49a2 (diff) |
lstat() cleanup
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 08b53c702..518a357ef 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -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; |