mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-13 01:36:15 +02:00
Do not attempt to chmod per-user dir when read-only.
This commit is contained in:
parent
de359da09a
commit
79583c2d38
1 changed files with 4 additions and 2 deletions
|
@ -204,8 +204,10 @@ LocalStore::LocalStore(const Params & params)
|
||||||
|
|
||||||
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
||||||
createDirs(perUserDir);
|
createDirs(perUserDir);
|
||||||
if (chmod(perUserDir.c_str(), 0755) == -1)
|
if (!readOnly) {
|
||||||
throw SysError("could not set permissions on '%s' to 755", perUserDir);
|
if (chmod(perUserDir.c_str(), 0755) == -1)
|
||||||
|
throw SysError("could not set permissions on '%s' to 755", perUserDir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Optionally, create directories and set permissions for a
|
/* Optionally, create directories and set permissions for a
|
||||||
|
|
Loading…
Reference in a new issue