about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-05-07T21·33+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-05-07T21·33+0000
commit6057b51835596ed282a2ad11f6f6fb8bdec13f7f (patch)
tree00ccdb6dfe362672f47edb99a00d9a753f11e48c
parent6c88d67780c1f009f6ffce46d95f5195c82790f6 (diff)
* Don't try to register GC roots in read-only mode.
-rw-r--r--src/libstore/store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 12045fc35bec..3c91c8e3849e 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -644,7 +644,7 @@ static Path _addToStore(bool fixed, bool recursive,
         
     else dstPath = makeStorePath("source", h, baseName);
 
-    addTempRoot(dstPath);
+    if (!readOnlyMode) addTempRoot(dstPath);
 
     if (!readOnlyMode && !isValidPath(dstPath)) { 
 
@@ -699,7 +699,7 @@ Path addTextToStore(const string & suffix, const string & s,
 
     Path dstPath = makeStorePath("text", hash, suffix);
     
-    addTempRoot(dstPath);
+    if (!readOnlyMode) addTempRoot(dstPath);
 
     if (!readOnlyMode && !isValidPath(dstPath)) {