mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 12:01:49 +02:00
daemon: Don't reply on 'st_blocks'.
Ported by Ludovic Courtès <ludo@gnu.org> from <https://github.com/NixOS/nix/commit/a2c4fcd5e9782dc8d2998773380c7171ee53b813>. * nix/libstore/gc.cc (LocalStore::removeUnusedLinks): Use 'st.st_size' instead of 'st.st_blocks * 512'. * nix/libutil/util.cc (_deletePath): Likewise.
This commit is contained in:
committed by
Ludovic Courtès
parent
7d09f2e85f
commit
546a709f20
+1
-1
@@ -309,7 +309,7 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed)
|
||||
struct stat st = lstat(path);
|
||||
|
||||
if (!S_ISDIR(st.st_mode) && st.st_nlink == 1)
|
||||
bytesFreed += st.st_blocks * 512;
|
||||
bytesFreed += st.st_size;
|
||||
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
/* Make the directory writable. */
|
||||
|
||||
Reference in New Issue
Block a user