Using / for relative paths; should fix gh-697

This commit is contained in:
Marcin Grzejszczak
2018-08-09 15:51:28 +02:00
parent e60eb56f2b
commit 6d630482ea

View File

@@ -84,7 +84,8 @@ public class ClasspathStubProvider implements StubDownloaderBuilder {
if (log.isDebugEnabled()) {
log.debug("Relative path for resource is [" + relativePath + "]");
}
int lastIndexOf = relativePath.lastIndexOf(File.separator);
// the relative path is OS agnostic and contains / only
int lastIndexOf = relativePath.lastIndexOf("/");
String relativePathWithoutFile = lastIndexOf > -1 ?
relativePath.substring(0, lastIndexOf) :
relativePath;