[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #134: find-files traverses symlinks
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #134: find-files traverses symlinks |
Date: |
Sun, 29 Nov 2009 02:59:13 -0000 |
#134: find-files traverses symlinks
-------------------------------+--------------------------------------------
Reporter: zbigniew | Owner:
Type: defect | Status: new
Priority: not urgent at all | Milestone:
Component: core libraries | Version: 4.2.x
Keywords: |
-------------------------------+--------------------------------------------
find-files traverses symlinks. This behavior isn't specifically
documented so I would like to know if it is correct (and I will document)
or incorrect.
{{{
~/tmp$ ls -lR foo
total 8
lrwxr-xr-x 1 jim jim 1 Nov 28 20:45 bar@ -> .
-rw-r--r-- 1 jim jim 0 Nov 28 20:39 baz
~/tmp$ csi4 -R posix -e '(find-files "foo" identity (lambda (x xs) (print
x))
#f 2)'
foo/bar
foo/bar/bar
foo/bar/bar/bar
foo/bar/bar/baz
foo/bar/baz
foo/baz
}}}
If I set a LIMIT procedure to check for symlink it will not traverse it.
{{{
~/tmp$ csi4 -R posix -e '(find-files "foo" identity (lambda (x xs) (print
x))
#f (lambda (x) (not (symbolic-link? x))))'
foo/bar
foo/baz
}}}
If I use directory? as limit procedure the symlink traversal is still done
because directory? reads through the link, so it prints out a large yet
attractive triangle.
Actually I would also like to know if this behavior is correct for
directory?, and I will document that result too.
--
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/134>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #134: find-files traverses symlinks,
Chicken Trac <=