On Mon, Aug 11, 2008 at 3:20 PM, Joe Orton <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 08, 2008 at 09:42:01AM -0400, Jeff Trawick wrote:
> > On Fri, Aug 8, 2008 at 5:28 AM, Joe Orton <[EMAIL PROTECTED]> wrote:
> > > On Thu, Aug 07, 2008 at 03:12:00PM -0000, Jeff Trawick wrote:
> > > > --- httpd/httpd/trunk/modules/dav/fs/repos.c (original)
> > > > +++ httpd/httpd/trunk/modules/dav/fs/repos.c Thu Aug 7 08:12:00 2008
> > > > @@ -1475,10 +1475,8 @@
> > > > /* append this file onto the path buffer (copy null term) */
> > > > dav_buffer_place_mem(pool, &fsctx->path1, dirent.name, len
> + 1,
> > > 0);
> > > >
> > > > -
> > > > - /* ### Optimize me, dirent can give us what we need! */
> > > > status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
> > > > - APR_FINFO_NORM | APR_FINFO_LINK, pool);
> > > > + APR_FINFO_TYPE | APR_FINFO_LINK, pool);
> > > > if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
> > > > /* woah! where'd it go? */
> > > > /* ### should have a better error here */
> > > >
> > >
> > > Nit pick: on Unix APR_FINFO_PROT is needed too, to support the
> > > executable property....
> >
> > plz show me where; I'm blind; thanks!
>
> If I'm understanding things correctly, this stat() call fetches file
> attributes which will be used when returning property information via
> dav_fs_insert_prop.
>
It took me a while, but I found out how ;)
dav_fs_internal_walk() does
fsctx.res1.info = &fsctx.info1;
and much later
/* point the callback's resource at our structure */
fsctx.wres.resource = &fsctx.res1;
so this call to a callback (dav_propfind_walker) makes available the info
gathered by this apr_stat():
if (fsctx->info1.finfo.filetype == APR_REG) {
/* call the function for the specified dir + file */
if ((err = (*params->func)(&fsctx->wres,
wres has addressability to new stat <<<<
DAV_CALLTYPE_MEMBER)) != NULL) {
/* ### maybe add a higher-level description? */
break;
}
}
(Ouch!) This was complicated enough that my naive attempts to see who cared
about info1.finfo were useless.
Thanks for noticing/fixing!