From 5a365b0c891b88fc9ade9faa7084ff6ed20c5b59 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 5 Apr 2024 14:31:43 -0400 Subject: [PATCH] Delete dead `openFile` in `binary-cache-store.cc` (#10418) d64cb33e90a5d178222c4e8e3f49d44c33fd93ae / #5111 previously deleted the dead code where this was used, but missed this. --- src/libstore/binary-cache-store.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index bea2bb370..97b6ec052 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -124,14 +124,6 @@ void BinaryCacheStore::writeNarInfo(ref narInfo) diskCache->upsertNarInfo(getUri(), std::string(narInfo->path.hashPart()), std::shared_ptr(narInfo)); } -AutoCloseFD openFile(const Path & path) -{ - auto fd = open(path.c_str(), O_RDONLY | O_CLOEXEC); - if (!fd) - throw SysError("opening file '%1%'", path); - return fd; -} - ref BinaryCacheStore::addToStoreCommon( Source & narSource, RepairFlag repair, CheckSigsFlag checkSigs, std::function mkInfo)