From f53574ebd60e5a22dbaae7e2bec97f5993670c20 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Sep 2013 12:06:59 +0000 Subject: [PATCH] RestoreSink: Slightly reduce the number of concurrent FDs --- src/libutil/archive.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index 999b17cd2..b19ff4bf9 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -282,6 +282,7 @@ struct RestoreSink : ParseSink void createRegularFile(const Path & path) { Path p = dstPath + path; + fd.close(); fd = open(p.c_str(), O_CREAT | O_EXCL | O_WRONLY, 0666); if (fd == -1) throw SysError(format("creating file `%1%'") % p); }