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:
parent
3db293a71d
commit
855f3948ec
1 changed files with 1 additions and 4 deletions
|
@ -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))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue