if (sourcePath != null) {
String path = command.getCurrentRequest().getEndpoint().getPath();
int startOfDestinationPath = path.lastIndexOf("/", path.lastIndexOf("/") - 1);
String destinationPath = path.substring(startOfDestinationPath);
exception = new CopyObjectException(sourcePath, destinationPath, message);
exception.initCause(oldException);
}
else if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
String path = command.getCurrentRequest().getEndpoint().getPath();
Matcher matcher = CONTAINER_PATH.matcher(path);