This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new 09163e5985 Move infinite copy test to include all recurrsive code 09163e5985 is described below commit 09163e5985c003bd5f33886614a72ffa1ae04f11 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu May 23 13:26:46 2024 +0100 Move infinite copy test to include all recurrsive code Review by kkolinko --- .../apache/catalina/servlets/WebdavServlet.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index b1b67030af..121d2d6593 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1586,19 +1586,19 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } - String[] entries = resources.list(source); - for (String entry : entries) { - String childDest = dest; - if (!childDest.equals("/")) { - childDest += "/"; - } - childDest += entry; - String childSrc = source; - if (!childSrc.equals("/")) { - childSrc += "/"; - } - childSrc += entry; - if (infiniteCopy) { + if (infiniteCopy) { + String[] entries = resources.list(source); + for (String entry : entries) { + String childDest = dest; + if (!childDest.equals("/")) { + childDest += "/"; + } + childDest += entry; + String childSrc = source; + if (!childSrc.equals("/")) { + childSrc += "/"; + } + childSrc += entry; copyResource(errorList, childSrc, childDest, true); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org