mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 14:32:42 +01: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
|
|
@ -1,7 +1,6 @@
|
|||
#include "globals.hh"
|
||||
#include "misc.hh"
|
||||
#include "local-store.hh"
|
||||
#include "immutable.hh"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
|
@ -456,7 +455,6 @@ void LocalStore::deletePathRecursive(GCState & state, const Path & path)
|
|||
// if the path was not valid, need to determine the actual
|
||||
// size.
|
||||
state.bytesInvalidated += size;
|
||||
makeMutable(path.c_str());
|
||||
// Mac OS X cannot rename directories if they are read-only.
|
||||
if (chmod(path.c_str(), st.st_mode | S_IWUSR) == -1)
|
||||
throw SysError(format("making `%1%' writable") % path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue