aboutsummaryrefslogtreecommitdiff
path: root/src/nix/prefetch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/prefetch.cc')
-rw-r--r--src/nix/prefetch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc
index 0104635fb..8f74984e0 100644
--- a/src/nix/prefetch.cc
+++ b/src/nix/prefetch.cc
@@ -92,7 +92,7 @@ std::tuple<StorePath, Hash> prefetchFile(
if (executable)
mode = 0700;
- AutoCloseFD fd = open(tmpFile.c_str(), O_WRONLY | O_CREAT | O_EXCL, mode);
+ AutoCloseFD fd{open(tmpFile.c_str(), O_WRONLY | O_CREAT | O_EXCL, mode)};
if (!fd) throw SysError("creating temporary file '%s'", tmpFile);
FdSink sink(fd.get());