apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: cvs commit: apr/file_io/win32 dir.c
Date Tue, 07 Aug 2001 14:33:27 GMT
From: <trawick@apache.org>
Sent: Tuesday, August 07, 2001 9:12 AM


> trawick     01/08/07 07:12:29
> 
>   Modified:    file_io/win32 dir.c
>   Log:
>   mention some problems with apr_dir_rewind() for Win32
>   
>   Revision  Changes    Path
>   1.58      +6 -0      apr/file_io/win32/dir.c
>   
>   Index: dir.c
>   ===================================================================
>   RCS file: /home/cvs/apr/file_io/win32/dir.c,v
>   retrieving revision 1.57
>   retrieving revision 1.58
>   diff -u -r1.57 -r1.58
>   --- dir.c 2001/08/06 21:04:50 1.57
>   +++ dir.c 2001/08/07 14:12:29 1.58
>   @@ -257,6 +257,12 @@
>    
>    APR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *dir)
>    {
>   +    /* XXX FIXME...
>   +     * 1) dir_cleanup() does FindClose(), so the FindClose() call
>   +     *    here will always return a meaningless error (bad handle).

Outch

>   +     * 2) Don't we need to re-open the directory, or is there a
>   +     *    Win32 way to rewind?

No.  By closing (and marking the handle as closed) the next apr_dir_read
will reopen the directory walk.  There is no such thing as an 'open dir'
on win32, you are either reading the first, or the next entry.

Bill


Mime
View raw message