about summary refs log tree commit diff
path: root/src/libstore/local-fs-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-fs-store.cc')
-rw-r--r--src/libstore/local-fs-store.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc
index c5da73dba36c..002ee4a65ce2 100644
--- a/src/libstore/local-fs-store.cc
+++ b/src/libstore/local-fs-store.cc
@@ -95,7 +95,11 @@ std::shared_ptr<std::string> LocalFSStore::getBuildLog(const Path & path_)
     assertStorePath(path);
 
     if (!isDerivation(path)) {
-        path = queryPathInfo(path)->deriver;
+        try {
+            path = queryPathInfo(path)->deriver;
+        } catch (InvalidPath &) {
+            return nullptr;
+        }
         if (path == "") return nullptr;
     }