mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 04:30:59 +01:00
This commit is contained in:
parent
ec7b0afb08
commit
094c69ad19
9 changed files with 41 additions and 25 deletions
|
|
@ -50,20 +50,23 @@ void createSubStateDirsTxn(const Transaction & txn, const DerivationStateOutputD
|
|||
DerivationStateOutputDir d = i->second;
|
||||
|
||||
string thisdir = d.path;
|
||||
|
||||
//If it is a file: continue
|
||||
if(thisdir.substr(thisdir.length() -1 , thisdir.length()) != "/")
|
||||
continue;
|
||||
|
||||
Path fullstatedir = stateDir + "/" + thisdir;
|
||||
|
||||
setStatePathRights(fullstatedir, queryCallingUsername(), "nixbld");
|
||||
//If it is a file: continue
|
||||
if(thisdir.substr(thisdir.length() -1 , thisdir.length()) != "/"){
|
||||
continue;
|
||||
}
|
||||
|
||||
ensureDirExists(fullstatedir);
|
||||
|
||||
if(d.type == "interval"){
|
||||
intervalPaths.insert(fullstatedir);
|
||||
}
|
||||
}
|
||||
|
||||
setChown(statePath, queryCallingUsername(), "nixbld", true); //Set all dirs in the statePath recursively to their owners
|
||||
printMsg(lvlTalkative, format("Set CHOWN '%1%'") % (statePath + "-" + queryCallingUsername()));
|
||||
|
||||
//Initialize the counters for the statePaths that have an interval to 0
|
||||
IntVector empty;
|
||||
setStatePathsIntervalTxn(txn, intervalPaths, empty, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue