On 23/05/2024 12:53, Konstantin Kolinko wrote:
вт, 21 мая 2024 г. в 14:55, <ma...@apache.org>:
The following commit(s) were added to refs/heads/main by this push:
new 4176706761 Add support for shallow copies when using WebDAV
4176706761 is described below
commit 4176706761242851b14be303daf2a00ef385ee49
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue May 21 12:54:40 2024 +0100
Add support for shallow copies when using WebDAV
<snip/>
@@ -1583,7 +1598,9 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
childSrc += "/";
}
childSrc += entry;
- copyResource(errorList, childSrc, childDest);
+ if (infiniteCopy) {
+ copyResource(errorList, childSrc, childDest, true);
+ }
}
I think that the "if (infiniteCopy)" block here is too narrow.
The whole loop over children (starting with "String[] entries =
resources.list(source)") here is useless when the infiniteCopy option
is false.
Thanks for the review. I've widened the block.
Thinking about it the infinite/not infinite copy option is fairly
pointless. For a file it has no impact. For a directory you either copy
the whole tree or just create a new directory - and MKCOL can be used
for that. Oh well.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org