mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Clear any immutable bits in the Nix store
Doing this once makes subsequent operations like garbage collecting more efficient since we don't have to call makeMutable() first.
This commit is contained in:
parent
0a4e90395c
commit
def5160b61
10 changed files with 76 additions and 89 deletions
|
@ -13,7 +13,6 @@
|
|||
#include <limits.h>
|
||||
|
||||
#include "util.hh"
|
||||
#include "immutable.hh"
|
||||
|
||||
|
||||
extern char * * environ;
|
||||
|
@ -305,8 +304,6 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed)
|
|||
|
||||
struct stat st = lstat(path);
|
||||
|
||||
if (S_ISDIR(st.st_mode) || S_ISREG(st.st_mode)) makeMutable(path);
|
||||
|
||||
if (!S_ISDIR(st.st_mode) && st.st_nlink == 1)
|
||||
bytesFreed += st.st_blocks * 512;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue