about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/remote-fs-accessor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/remote-fs-accessor.cc')
-rw-r--r--third_party/nix/src/libstore/remote-fs-accessor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/remote-fs-accessor.cc b/third_party/nix/src/libstore/remote-fs-accessor.cc
index d5b2028847..4178030b55 100644
--- a/third_party/nix/src/libstore/remote-fs-accessor.cc
+++ b/third_party/nix/src/libstore/remote-fs-accessor.cc
@@ -70,7 +70,7 @@ std::pair<ref<FSAccessor>, Path> RemoteFSAccessor::fetch(const Path& path_) {
 
       auto narAccessor = makeLazyNarAccessor(
           listing, [cacheFile](uint64_t offset, uint64_t length) {
-            AutoCloseFD fd = open(cacheFile.c_str(), O_RDONLY | O_CLOEXEC);
+            AutoCloseFD fd(open(cacheFile.c_str(), O_RDONLY | O_CLOEXEC));
             if (!fd) {
               throw SysError("opening NAR cache file '%s'", cacheFile);
             }