diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-18 15:41:14 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-18 15:41:14 +0200 |
commit | 75cd75b1ae3d32267ec5b92f7e047dc9ea33f075 (patch) | |
tree | 95b99f59f2dba1ae61ea5fe027e2ce7f66d3caf8 /src/libstore/remote-fs-accessor.cc | |
parent | d8306148e04919b5ecf0e6fb58682a38d99ef944 (diff) |
Errors writing to the NAR cache should not be fatal
Diffstat (limited to 'src/libstore/remote-fs-accessor.cc')
-rw-r--r-- | src/libstore/remote-fs-accessor.cc | 6 |
1 files changed, 5 insertions, 1 deletions
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<ref<FSAccessor>, Path> RemoteFSAccessor::fetch(const Path & path_) |