diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-01T21·00+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-01T21·00+0000 |
commit | fcd9900d74b0eb3d57402c448ede2a411133fa46 (patch) | |
tree | 642df2be381e3c9b239ca59c170052a43113fa30 /src/libexpr | |
parent | a824d58b566752b2a89a718fd628053754968d72 (diff) |
* Replace read-only calls to addTextToStore.
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 17a04bc83390..1d0d9c6b2245 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -389,7 +389,9 @@ static Expr primToFile(EvalState & state, const ATermVector & args) refs.insert(*i); } - Path storePath = store->addTextToStore(name, contents, refs); + Path storePath = readOnlyMode + ? computeStorePathForText(name, contents) + : store->addTextToStore(name, contents, refs); /* Note: we don't need to add `context' to the context of the result, since `storePath' itself has references to the paths |