Skip to content

Commit

Permalink
fix SPR-15332, second try
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmey committed Mar 14, 2017
1 parent 79ea779 commit 1651ddd
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -574,11 +574,16 @@ protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
// being arbitrary as long as following the entry format.
// We'll also handle paths with and without leading "file:" prefix.
String urlFile = rootDirURL.getFile();
String protocol = rootDirURL.getProtocol();
String urlSeparator = ResourceUtils.JAR_URL_SEPARATOR;
if (ResourceUtils.URL_PROTOCOL_WAR.equals(protocol)) {
urlSeparator = ResourceUtils.WAR_URL_SEPARATOR;
}
try {
int separatorIndex = urlFile.indexOf(ResourceUtils.JAR_URL_SEPARATOR);
int separatorIndex = urlFile.indexOf(urlSeparator);
if (separatorIndex != -1) {
jarFileUrl = urlFile.substring(0, separatorIndex);
rootEntryPath = urlFile.substring(separatorIndex + ResourceUtils.JAR_URL_SEPARATOR.length());
rootEntryPath = urlFile.substring(separatorIndex + urlSeparator.length());
jarFile = getJarFile(jarFileUrl);
}
else {
Expand Down

0 comments on commit 1651ddd

Please sign in to comment.