Skip to content

Commit

Permalink
Merge pull request gravitylow#29 from NRUB/patch-1
Browse files Browse the repository at this point in the history
Support for more complex file name
  • Loading branch information
gravitylow committed Dec 17, 2015
2 parents b1a4268 + 3596c52 commit 939e624
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/gravitydevelopment/updater/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,9 @@ private boolean versionCheck() {
final String title = this.versionName;
if (this.type != UpdateType.NO_VERSION_CHECK) {
final String localVersion = this.plugin.getDescription().getVersion();
if (title.split(DELIMETER).length == 2) {
if (title.split(DELIMETER).length >= 2) {
// Get the newest file's version number
final String remoteVersion = title.split(DELIMETER)[1].split(" ")[0];
final String remoteVersion = title.split(DELIMETER)[title.split(DELIMETER).length - 1].split(" ")[0];

if (this.hasTag(localVersion) || !this.shouldUpdate(localVersion, remoteVersion)) {
// We already have the latest version, or this build is tagged for no-update
Expand Down

0 comments on commit 939e624

Please sign in to comment.