aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorAndrew Brooks <andrew.brooks@flightaware.com>2022-09-12 11:33:23 -0500
committerAndrew Brooks <andrew.brooks@flightaware.com>2022-09-12 11:33:23 -0500
commit565d888e0f6a2c66ee7b10f6fe6a97f79fa51732 (patch)
tree76a77d5552e398d658ded857b36ff8a656ac63e3 /src/libstore/local-store.cc
parent84fe75a12a085c6b4b8d4ac65a048f569de1252b (diff)
Address PR feedback on #6694
Diffstat (limited to 'src/libstore/local-store.cc')
-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 5ee451da3..0b07cde34 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1433,7 +1433,6 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, std::string_view name
} else {
/* Move the temporary path we restored above. */
moveFile(tempPath, realPath);
- tempDirFd.close();
}
/* For computing the nar hash. In recursive SHA-256 mode, this
@@ -1520,7 +1519,7 @@ std::pair<Path, AutoCloseFD> LocalStore::createTempDirInStore()
/* There is a slight possibility that `tmpDir' gets deleted by
the GC between createTempDir() and when we acquire a lock on it.
We'll repeat until 'tmpDir' exists and we've locked it. */
- tmpDirFn = createTempDir(realStoreDir, "add");
+ tmpDirFn = createTempDir(realStoreDir, "tmp");
tmpDirFd = open(tmpDirFn.c_str(), O_RDONLY | O_DIRECTORY);
if (tmpDirFd.get() < 0) {
continue;