Skip to content

Commit

Permalink
Fixed version extraction logic in installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
shannah committed Jan 15, 2022
1 parent e615f26 commit c1b0ef5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ private static String extractVersionFromFileName(String fileName) {
if (pos < 0) return null;

fileName = fileName.substring(0, pos);
Pattern p = Pattern.compile("\\-(\\d.*)$");
Pattern p = Pattern.compile("^.*?-(\\d.*)$");
Matcher m = p.matcher(fileName);
if (m.matches()) {
return m.group(1);
Expand Down Expand Up @@ -405,6 +405,7 @@ private File findInstallFilesDir(File startDir) {
String version = extractVersionFromFileName(appBundle.getName());
if (version == null) {
System.err.println("Cannot download bundle info from network because the version string was not found in the app name: "+appBundle.getName());
return null;
}
try {
return downloadJDeployBundleForCode(code, version);
Expand Down

0 comments on commit c1b0ef5

Please sign in to comment.