Make the store writable before creating /nix/store/.links

This commit is contained in:
Eelco Dolstra 2012-09-25 16:30:08 -04:00
parent 0f358ca5b6
commit d534f137f0

View file

@ -212,6 +212,7 @@ LocalStore::LocalStore(bool reserveSpace)
/* Create missing state directories if they don't already exist. */
createDirs(settings.nixStore);
makeStoreWritable();
createDirs(linksDir = settings.nixStore + "/.links");
Path profilesDir = settings.nixStateDir + "/profiles";
createDirs(settings.nixStateDir + "/profiles");
@ -297,8 +298,6 @@ LocalStore::LocalStore(bool reserveSpace)
}
else openDB(false);
makeStoreWritable();
}