1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

ice-9 ftw: Use 'absolute-file-name?' in 'nftw'.

* module/ice-9/ftw.scm (abs?): Remove.
(nftw): Use 'absolute-file-name?' instead.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-08-13 18:54:22 +02:00
parent 3db293a71d
commit 855f3948ec
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -231,9 +231,6 @@
(substring result 1 (string-length result))) (substring result 1 (string-length result)))
(loop (cdr nodes) (string-append result "/" (car nodes)))))) (loop (cdr nodes) (string-append result "/" (car nodes))))))
(define (abs? filename)
(char=? #\/ (string-ref filename 0)))
;; `visited?-proc' returns a test procedure VISITED? which when called as ;; `visited?-proc' returns a test procedure VISITED? which when called as
;; (VISITED? stat-obj) returns #f the first time a distinct file is seen, ;; (VISITED? stat-obj) returns #f the first time a distinct file is seen,
;; then #t on any subsequent sighting of it. ;; then #t on any subsequent sighting of it.
@ -347,7 +344,7 @@
(lambda (s) #t))) (lambda (s) #t)))
(base-sub (lambda (name base) (substring name 0 base))) (base-sub (lambda (name base) (substring name 0 base)))
(maybe-cd (if (memq 'chdir control-flags) (maybe-cd (if (memq 'chdir control-flags)
(if (abs? filename) (if (absolute-file-name? filename)
(lambda (fullname base) (lambda (fullname base)
(or (= 0 base) (or (= 0 base)
(chdir (base-sub fullname base)))) (chdir (base-sub fullname base))))