From 5f1782a938ad14ed677a6cd283f70fa62613451f Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 20 Jan 2025 23:06:25 +0100 Subject: [PATCH] libstore: remove HttpBinaryCacheStore::getFileContents the default implementation using getFile does exactly the same thing, unless the thing being downloaded goes away immediately before we try to resume a partial download. that's best treated as a different kind of error though because the target did exist the first time we asked. Change-Id: Ic0c046bdcd9d9751c6ba78167c68a38d0d2739e9 --- lix/libstore/http-binary-cache-store.cc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lix/libstore/http-binary-cache-store.cc b/lix/libstore/http-binary-cache-store.cc index 3ed5dac01..726291c7c 100644 --- a/lix/libstore/http-binary-cache-store.cc +++ b/lix/libstore/http-binary-cache-store.cc @@ -160,20 +160,6 @@ protected: } } - std::optional getFileContents(const std::string & path) override - { - checkEnabled(); - - try { - return getFileTransfer()->download(makeURI(path)).second->drain(); - } catch (FileTransferError & e) { - if (e.error == FileTransfer::NotFound || e.error == FileTransfer::Forbidden) - return {}; - maybeDisable(); - throw; - } - } - /** * This isn't actually necessary read only. We support "upsert" now, so we * have a notion of authentication via HTTP POST/PUT.