mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
* Sync with the trunk.
This commit is contained in:
commit
bf87cc44b4
16 changed files with 140 additions and 16 deletions
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue