summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-26 16:38:38 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-28 23:24:18 +0200
commiteee212710978fb2044d3312aff0bf33b508aa026 (patch)
tree2c68762f394d3dc47926bd2810e2026332c75321 /guix/store.scm
parent02100028bb78b9bb17764eab0f009fd6fa07fd7b (diff)
downloadgnu-guix-eee212710978fb2044d3312aff0bf33b508aa026.tar
gnu-guix-eee212710978fb2044d3312aff0bf33b508aa026.tar.gz
store: (direct-store-path? (%store-prefix)) returns #f.
* guix/store.scm (direct-store-path?): Return #f if PATH is (%store-prefix). * tests/store.scm ("direct-store-path?"): Add test.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm1
1 files changed, 1 insertions, 0 deletions
diff --git a/guix/store.scm b/guix/store.scm
index c1898c5c81..2b924db213 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -839,6 +839,7 @@ be used internally by the daemon's build hook."
This predicate is sometimes needed because files *under* a store path are not
valid inputs."
(and (store-path? path)
+ (not (string=? path (%store-prefix)))
(let ((len (+ 1 (string-length (%store-prefix)))))
(not (string-index (substring path len) #\/)))))