Hi,
In message "?? weirdness in Find.find/lstat ??"
on 02/12/07, ahoward <ahoward / fsl.noaa.gov> writes:
|lstat itself seems to have strange behaviour :
|
| /tmp > ruby -r find -e "p File.lstat('bar').directory?"
| false
|
| /tmp > ruby -r find -e "p File.lstat('bar/').directory?"
| true
|
|i checked and this is the behaviour of the underlying C calls as well. is
|this a linux bug, or do all lstat/stat posix calls work that way?
"bar/" is "bar" and "", which is considered as "bar/.", so that it is
referring the directory itself. I'm not sure if it's POSIX-ly defined
behavior.
matz.