about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-06-21T07·55+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-06-21T07·55+0000
commitbf87cc44b4484df74388b526c89884fea166ab7f (patch)
tree18a9a0e77d2e2a027eac094b3cdb43d6dd988cf4 /src/libstore/local-store.cc
parentd1f6c0cbe39b509545f809f08cbd580859f38e34 (diff)
parentb57189174f6e11c3e9e0f7c65c08a72f689fe194 (diff)
* Sync with the trunk.
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index cf0d559bdfb9..c7530f1b1bae 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1036,6 +1036,8 @@ void LocalStore::exportPath(const Path & path, bool sign,
         writeInt(1, hashAndWriteSink);
         
         Path tmpDir = createTempDir();
+        PathLocks tmpDirLock(singleton<PathSet, Path>(tmpDir));
+        tmpDirLock.setDeletion(true);
         AutoDelete delTmp(tmpDir);
         Path hashFile = tmpDir + "/hash";
         writeFile(hashFile, printHash(hash));
@@ -1085,6 +1087,8 @@ Path LocalStore::importPath(bool requireSignature, Source & source)
        store path follows the archive data proper), and besides, we
        don't know yet whether the signature is valid. */
     Path tmpDir = createTempDir(nixStore);
+    PathLocks tmpDirLock(singleton<PathSet, Path>(tmpDir));
+    tmpDirLock.setDeletion(true);
     AutoDelete delTmp(tmpDir); /* !!! could be GC'ed! */
     Path unpacked = tmpDir + "/unpacked";