mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 20:28:00 +08:00
PL-7228 Automatic update crashes with the "No existing modules found." exception if the path to tomcat contains "." or "()".
This commit is contained in:
parent
f2464d0b45
commit
f9e4f3aab8
@ -121,7 +121,7 @@ public class ScriptScanner {
|
||||
try {
|
||||
String decodedUrl = URLDecoder.decode(resource.getURL().toString(), "UTF-8");
|
||||
String resourcePath = decodedUrl.replaceFirst(".+?:", "");
|
||||
Matcher matcher = Pattern.compile(".*" + dbDirPath + "/?(.+?)/.*").matcher(resourcePath);
|
||||
Matcher matcher = Pattern.compile(".*" + Pattern.quote(dbDirPath) + "/{1}(.+?)/.*").matcher(resourcePath);
|
||||
return matcher.find() ? matcher.group(1) : null;
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("An error occurred while detecting modules", e);
|
||||
|
Loading…
Reference in New Issue
Block a user