From 36ca0ac7942b080492efb5b76bc256aab7d6cf58 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Sat, 30 Dec 2006 20:07:14 +0000 Subject: [PATCH] * If APR_FINFO_NAME is added to the list of wanted information, apr_stat always returns APR_INCOMPLETE on Unix platforms in the case that the call to the native stat / lstat did not fail. So we can safely assume that the stat / lstat call has been successful in this case. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@491297 13f79535-47bb-0310-9956-ffa450edef68 --- server/request.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/request.c b/server/request.c index 03493e32d3..34ffbafb4e 100644 --- a/server/request.c +++ b/server/request.c @@ -556,7 +556,14 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) rv = apr_stat(&thisinfo, r->filename, APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK, r->pool); - if (rv != APR_SUCCESS) { + /* + * APR_INCOMPLETE is as fine as result as APR_SUCCESS as we + * have added APR_FINFO_NAME to the wanted parameter of + * apr_stat above. On Unix platforms this means that apr_stat + * is always going to return APR_INCOMPLETE in the case that + * the call to the native stat / lstat did not fail. + */ + if ((rv != APR_INCOMPLETE) && (rv != APR_SUCCESS)) { /* * This should never happen, because we did a stat on the * same file, resolving a possible symlink several lines -- 2.40.0