From 75cd75b1ae3d32267ec5b92f7e047dc9ea33f075 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Oct 2017 15:41:14 +0200 Subject: Errors writing to the NAR cache should not be fatal --- src/libstore/remote-fs-accessor.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libstore/remote-fs-accessor.cc b/src/libstore/remote-fs-accessor.cc index 939691204..ba9620a17 100644 --- a/src/libstore/remote-fs-accessor.cc +++ b/src/libstore/remote-fs-accessor.cc @@ -19,9 +19,13 @@ Path RemoteFSAccessor::makeCacheFile(const Path & storePath) void RemoteFSAccessor::addToCache(const Path & storePath, const std::string & nar) { - if (cacheDir != "") + try { + if (cacheDir == "") return; /* FIXME: do this asynchronously. */ writeFile(makeCacheFile(storePath), nar); + } catch (...) { + ignoreException(); + } } std::pair, Path> RemoteFSAccessor::fetch(const Path & path_) -- cgit v1.2.3