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: Bug in unix apr_stat involving the name field.
Date Mon, 20 Sep 2004 17:38:39 GMT
At 11:53 AM 9/20/2004, you wrote:

>The following works on win32 but not on linux.  Looks like the name field of
>apr_file_t is never set on unix so the value is garbage.  

are you testing the .valid bit APR_FINFO_FNAME value?

There are scenarios on every platform when specific fields
cannot be set, it's important to check the .valid bits.

If apr_stat(...., APR_FINFO_NAME, poll) returns APR_SUCCESS, that
would be a bug, the correct return code is APR_INCOMPLETE.

It would be -totally- wrong to just stuff the name passed for
Unix, because some Unix file systems, e.g. mounted from Samba, 
HFS (Mac OS), and others can return another file from a 
non-canonical name.


View raw message