apr_dir_read (with something like APR_FINFO_TYPE in wanted) will return
APR_INCOMPLETE if it encounters a broken symlink... bug or feature?
I say bug... the caller can quite happily cope with symlinks, broken or
not, as they wish, they just wanted to know what is in the directory.
Regards,
joe
Index: file_io/unix/dir.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/unix/dir.c,v
retrieving revision 1.56
diff -u -r1.56 dir.c
--- file_io/unix/dir.c 2001/06/15 20:04:43 1.56
+++ file_io/unix/dir.c 2001/09/04 20:35:41
@@ -160,8 +160,7 @@
if (fspec[off - 1] != '/')
fspec[off++] = '/';
apr_cpystrn(fspec + off, thedir->entry->d_name, sizeof(fspec) - off);
- /* ??? Or lstat below? What is it we really want? */
- ret = apr_stat(finfo, fspec, wanted, thedir->cntxt);
+ ret = apr_lstat(finfo, fspec, wanted, thedir->cntxt);
}
if (wanted && (ret == APR_SUCCESS || ret == APR_INCOMPLETE)) {
|