apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Greig <sgr...@altair.com>
Subject Bug in unix apr_stat involving the name field.
Date Mon, 20 Sep 2004 16:53:33 GMT

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.  


apr_file_t finfo;
apr_status_t s = apr_stat(&finfo, filename,
                          APR_FINFO_NAME |
                          APR_FINFO_SIZE,
                          pool);

if (s == APR_SUCCESS)
{
   std::cout << "Path+Name: " << finfo.fname << std::endl;
   std::cout << "Name: " << finfo.name << std::endl;
   std::cout << "Size: " << finfo.size << std::endl;
}


I'm using apr-1.0.0

Thanks,
Scott Greig
Altair Engineering, Inc.

Mime
View raw message