about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 32aaca6be0ea..0f250a3c7c04 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -18,10 +18,7 @@ GCOptions::GCOptions()
 
 bool isInStore(const Path & path)
 {
-    return path[0] == '/'
-        && string(path, 0, settings.nixStore.size()) == settings.nixStore
-        && path.size() >= settings.nixStore.size() + 2
-        && path[settings.nixStore.size()] == '/';
+    return isInDir(path, settings.nixStore);
 }