apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From INOUE Seiichiro <in...@ariel-networks.com>
Subject apr_file_copy() fails on Windows
Date Wed, 27 Mar 2002 17:53:49 GMT

I found that apr_file_copy() fails on Windows XP, if perms is APR_FILE_SOURCE_PERMS.
I guess it occurs on other (apr_os_level >= APR_WIN_NT) Windows.

This occurs as follows,
# I will write variable like @variable.

In apr_file_transfer_contents(),
   status = apr_file_info_get(&finfo, APR_FINFO_PROT, s);
will fails as follows,

In more_finfo() [file_io/win32/filestat.c],
if @wanted == APR_FINFO_PROT, @user becomes NULL, then
   if (user) {
       finfo->user = user;
       finfo->valid |= APR_FINFO_USER;  /* <- not here */

Then, in resolv_prot() [file_io/win32/filestat.c],
   if ((wanted & APR_FINFO_UPROT) && (finfo->valid & APR_FINFO_USER)) {
       finfo->valid |= APR_FINFO_UPROT; /* <- not here */

Then, apr_file_info_get() above fails, and it causes apr_file_copy()'s failure.
This is the story.

I don't know what a proper fix is, so I can't submit a patch.
I would like someone to take care of it.

- INOUE Seiichiro <inoue@ariel-networks.com>

View raw message