> @@ -49,10 +51,21 @@ public void handleError(HttpCommand command, HttpResponse > response) { > exception = new AuthorizationException(exception.getMessage(), > exception); > break; > case 404: > - if (!command.getCurrentRequest().getMethod().equals("DELETE")) { > + String sourcePath = > command.getCurrentRequest().getFirstHeaderOrNull(SwiftHeaders.OBJECT_COPY_FROM); > + Exception oldException = exception; > + > + if (sourcePath != null) { > + String path = > command.getCurrentRequest().getEndpoint().getPath(); > + int startOfDestinationPath = path.lastIndexOf("/", > path.lastIndexOf("/") - 1); > + String destinationPath = > path.substring(startOfDestinationPath);
This is getting the substring after the _second_-last `/` in the path, if I'm correct? Perhaps add a comment to that effect? Or a short comment to describe the expected syntax of the path here, i.e. why it makes sense to get everything from the second-last '/' onward? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/73/files#r8709859