From 1cf4c24246b9a74f70af4ff1db941ffb3f2c66b3 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 12 Aug 2008 10:46:48 +0000 Subject: [PATCH] * modules/dav/fs/repos.c (DAV_FINFO_MASK): Define macro. (dav_fs_walker): Use DAV_FINFO_MASK when stat'ing the directory member during the walk. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@685112 13f79535-47bb-0310-9956-ffa450edef68 --- modules/dav/fs/repos.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c index 48d481a30a..8364ab686d 100644 --- a/modules/dav/fs/repos.c +++ b/modules/dav/fs/repos.c @@ -119,9 +119,19 @@ enum { ** Does this platform support an executable flag? ** ** ### need a way to portably abstract this query +** +** DAV_FINFO_MASK gives the appropriate mask to use for the stat call +** used to get file attributes. */ #ifndef WIN32 #define DAV_FS_HAS_EXECUTABLE +#define DAV_FINFO_MASK (APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_INODE | \ + APR_FINFO_SIZE | APR_FINFO_CTIME | APR_FINFO_MTIME | \ + APR_FINFO_PROT) +#else +/* as above, but without APR_FINFO_PROT */ +#define DAV_FINFO_MASK (APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_INODE | \ + APR_FINFO_SIZE | APR_FINFO_CTIME | APR_FINFO_MTIME) #endif /* @@ -1476,7 +1486,7 @@ static dav_error * dav_fs_walker(dav_fs_walker_context *fsctx, int depth) dav_buffer_place_mem(pool, &fsctx->path1, dirent.name, len + 1, 0); status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf, - APR_FINFO_TYPE | APR_FINFO_LINK, pool); + DAV_FINFO_MASK, pool); if (status != APR_SUCCESS && status != APR_INCOMPLETE) { /* woah! where'd it go? */ /* ### should have a better error here */ -- 2.40.0