diff options
Diffstat (limited to 'src/libstore/local-fs-store.cc')
-rw-r--r-- | src/libstore/local-fs-store.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index 002ee4a65ce2..57e1b8a09fe6 100644 --- a/src/libstore/local-fs-store.cc +++ b/src/libstore/local-fs-store.cc @@ -94,6 +94,7 @@ std::shared_ptr<std::string> LocalFSStore::getBuildLog(const Path & path_) assertStorePath(path); + if (!isDerivation(path)) { try { path = queryPathInfo(path)->deriver; @@ -116,8 +117,12 @@ std::shared_ptr<std::string> LocalFSStore::getBuildLog(const Path & path_) if (pathExists(logPath)) return std::make_shared<std::string>(readFile(logPath)); - else if (pathExists(logBz2Path)) - return decompress("bzip2", readFile(logBz2Path)); + else if (pathExists(logBz2Path)) { + try { + return decompress("bzip2", readFile(logBz2Path)); + } catch (Error &) { } + } + } return nullptr; |