about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/local-store.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 3fd772f26fb1..6882e9328b6e 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -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();
 }