[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/03: ice-9 ftw: Use 'absolute-file-name?' in 'nftw'.
From: |
Jan Nieuwenhuizen |
Subject: |
[Guile-commits] 02/03: ice-9 ftw: Use 'absolute-file-name?' in 'nftw'. |
Date: |
Mon, 12 Apr 2021 08:31:02 -0400 (EDT) |
janneke pushed a commit to branch master
in repository guile.
commit 855f3948eca7bb56fdbbc3d47a6d485ccf012a3c
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Thu Aug 13 18:54:22 2020 +0200
ice-9 ftw: Use 'absolute-file-name?' in 'nftw'.
* module/ice-9/ftw.scm (abs?): Remove.
(nftw): Use 'absolute-file-name?' instead.
---
module/ice-9/ftw.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/module/ice-9/ftw.scm b/module/ice-9/ftw.scm
index ac4dd60..dd6f490 100644
--- a/module/ice-9/ftw.scm
+++ b/module/ice-9/ftw.scm
@@ -231,9 +231,6 @@
(substring result 1 (string-length result)))
(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? stat-obj) returns #f the first time a distinct file is seen,
;; then #t on any subsequent sighting of it.
@@ -347,7 +344,7 @@
(lambda (s) #t)))
(base-sub (lambda (name base) (substring name 0 base)))
(maybe-cd (if (memq 'chdir control-flags)
- (if (abs? filename)
+ (if (absolute-file-name? filename)
(lambda (fullname base)
(or (= 0 base)
(chdir (base-sub fullname base))))