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, 4 insertions, 2 deletions
diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc
index 87c216ec9f95..8b72c05b7b90 100644
--- a/src/libstore/local-fs-store.cc
+++ b/src/libstore/local-fs-store.cc
@@ -69,9 +69,11 @@ ref<FSAccessor> LocalFSStore::getFSAccessor()
     return make_ref<LocalStoreAccessor>(ref<Store>(shared_from_this()));
 }
 
-void LocalFSStore::dumpPath(const Path & path, Sink & sink)
+void LocalFSStore::narFromPath(const Path & path, Sink & sink)
 {
-    nix::dumpPath(path, sink);
+    if (!isValidPath(path))
+        throw Error(format("path ‘%s’ is not valid") % path);
+    dumpPath(path, sink);
 }
 
 }