try {
NamingEnumeration<NameClassPair> enumeration =
resources.list(source);
while (enumeration.hasMoreElements()) {
NameClassPair ncPair = enumeration.nextElement();
String childDest = dest;
if (!childDest.equals("/"))
childDest += "/";
childDest += ncPair.getName();
String childSrc = source;
if (!childSrc.equals("/"))
childSrc += "/";
childSrc += ncPair.getName();
copyResource(resources, errorList, childSrc, childDest);
}
} catch (NamingException e) {
errorList.put(dest, WebdavStatus.SC_INTERNAL_SERVER_ERROR);
return false;