#694 closed defect (fixed)
find-files does follow symlinks contradicts documentation
Reported by: | Christian Kellermann | Owned by: | Christian Kellermann |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | unknown | Version: | 4.7.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
Found by Sascha Ziemann:
The documentation for find-files says: By default, symbolic links are
not followed.
Try this:
$ ln -s this .
$ csi -R posix -e '(write (find-files "."))'
$ csi -v
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.0
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
compiled 2011-09-16 on sn-e0692 (Linux)
Change History (7)
comment:1 Changed 13 years ago by
Status: | new → accepted |
---|
comment:2 Changed 13 years ago by
Chicken 4.5.0's find-files follows symlinks by default, so the current behaviour is "correct" with respect to keeping backwards compatibility.
On the other hand this will not work for the simple version of the current find-file implementation. My recommendation is to remove the deprecated code path and carry on with life. Everyone will be happy again.
Also note that even in the current implementation the default is to follow symlinks.
comment:3 Changed 13 years ago by
Yes, the old signature doesn't need to be supported anymore (it was deprecated in 4.6.0, I believe). Also, the documentation should be changed.
comment:5 Changed 13 years ago by
I propose we change the behaviour to fit the docs, also see chicken-hackers discussions about this
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
I pushed commit 9aaea62 to master, disabling following symlinks by default
Due to the test of (or (null? args) (not (keyword? (car args)))) the code follows the legacy codepath supporting the older call to find-files. This explicitly sets follow symlinks to #f
I have to check whether this has been the default behaviour for older chickens.