summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/build/utils.scm9
-rw-r--r--guix/search-paths.scm6
2 files changed, 6 insertions, 9 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e3f9edc5b5..2988193fce 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -385,10 +385,13 @@ for under the directories designated by FILES. For example:
(append-map (lambda (input)
(append-map (lambda (file)
(let ((file (string-append input "/" file)))
- ;; XXX: By using 'find-files', we implicitly
- ;; assume #:type 'regular.
(if pattern
- (find-files file pattern)
+ (find-files file (lambda (file stat)
+ (and stat
+ (eq? type (stat:type stat))
+ ((file-name-predicate pattern) file stat)))
+ #:stat stat
+ #:directories? #t)
(let ((stat (stat file #f)))
(if (and stat (eq? type (stat:type stat)))
(list file)
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 7fd15d440c..7a6fe67959 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -139,12 +139,6 @@ report only settings not already effective."
(let* ((values (or (and=> (getenv variable)
(cut string-tokenize* <> separator))
'()))
- ;; Add a trailing slash to force symlinks to be treated as
- ;; directories when 'find-files' traverses them.
- (files (if pattern
- (map (cut string-append <> "/") files)
- files))
-
;; XXX: Silence 'find-files' when it stumbles upon non-existent
;; directories (see
;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.)