diff options
Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r-- | src/libstore/store.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc index 5b471a1d9cd8..1f05b63a6cce 100644 --- a/src/libstore/store.cc +++ b/src/libstore/store.cc @@ -448,6 +448,8 @@ Path addToStore(const Path & _srcPath) copyPath(srcPath, dstPath); + makePathReadOnly(dstPath); + Transaction txn(nixDB); registerValidPath(txn, dstPath); txn.commit(); @@ -476,6 +478,8 @@ void addTextToStore(const Path & dstPath, const string & s) writeStringToFile(dstPath, s); + makePathReadOnly(dstPath); + Transaction txn(nixDB); registerValidPath(txn, dstPath); txn.commit(); |