diff --git a/Vagrant Manager.xcodeproj/project.pbxproj b/Vagrant Manager.xcodeproj/project.pbxproj
index ef828c5..f908626 100644
--- a/Vagrant Manager.xcodeproj/project.pbxproj
+++ b/Vagrant Manager.xcodeproj/project.pbxproj
@@ -7,9 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
- 2609ECF51BC89CEA00E4B44E /* NFSScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2609ECF41BC89CEA00E4B44E /* NFSScanner.m */; settings = {ASSET_TAGS = (); }; };
- 2609ECF71BC8A04600E4B44E /* rdp@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF61BC8A04600E4B44E /* rdp@2x.png */; settings = {ASSET_TAGS = (); }; };
- 2609ECF91BC8A05100E4B44E /* rdp.png in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF81BC8A05100E4B44E /* rdp.png */; settings = {ASSET_TAGS = (); }; };
+ 2609ECF51BC89CEA00E4B44E /* NFSScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2609ECF41BC89CEA00E4B44E /* NFSScanner.m */; };
+ 2609ECF71BC8A04600E4B44E /* rdp@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF61BC8A04600E4B44E /* rdp@2x.png */; };
+ 2609ECF91BC8A05100E4B44E /* rdp.png in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF81BC8A05100E4B44E /* rdp.png */; };
26130E9A1B1D565200872C4F /* bm_status_icon_off.png in Resources */ = {isa = PBXBuildFile; fileRef = 26130E981B1D565200872C4F /* bm_status_icon_off.png */; };
26130E9B1B1D565200872C4F /* bm_status_icon_off@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 26130E991B1D565200872C4F /* bm_status_icon_off@2x.png */; };
26130E9E1B1D596400872C4F /* bm_status_icon_suspended@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 26130E9C1B1D596400872C4F /* bm_status_icon_suspended@2x.png */; };
diff --git a/Vagrant Manager/AppDelegate.m b/Vagrant Manager/AppDelegate.m
index c9ebe2f..33be37a 100644
--- a/Vagrant Manager/AppDelegate.m
+++ b/Vagrant Manager/AppDelegate.m
@@ -274,26 +274,28 @@ - (void)checkForVagrantUpdates:(BOOL)showAlert {
BOOL newVersionAvailable = NO;
BOOL invalidOutput = YES;
- NSString *currentVersion;
- NSString *latestVersion;
+ NSString *currentVersion = nil;
+ NSString *latestVersion = nil;
-
- if([lines count] >= 2) {
- NSArray *installedVersionParts = [[lines objectAtIndex:0] componentsSeparatedByString:@","];
- NSArray *latestVersionParts = [[lines objectAtIndex:1] componentsSeparatedByString:@","];
+ for(NSString *line in lines) {
+ NSArray *cols = [line componentsSeparatedByString:@","];
- if([installedVersionParts count] >= 4 && [latestVersionParts count] >= 4) {
- currentVersion = [installedVersionParts objectAtIndex:3];
- latestVersion = [latestVersionParts objectAtIndex:3];
-
- if([Util compareVersion:currentVersion toVersion:latestVersion] == NSOrderedAscending) {
- newVersionAvailable = YES;
+ if([cols count] >=4 ) {
+ if([[cols objectAtIndex:2] isEqualToString:@"version-installed"]) {
+ currentVersion = [cols objectAtIndex:3];
+ } else if([[cols objectAtIndex:2] isEqualToString:@"version-latest"]) {
+ latestVersion = [cols objectAtIndex:3];
}
-
- invalidOutput = NO;
}
}
+ if(currentVersion && latestVersion) {
+ newVersionAvailable = [Util compareVersion:currentVersion toVersion:latestVersion] == NSOrderedAscending;
+ invalidOutput = NO;
+ } else {
+ invalidOutput = YES;
+ }
+
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:@"vagrant-manager.vagrant-update-available" object:nil userInfo:@{@"is_update_available": [NSNumber numberWithBool:newVersionAvailable]}];
diff --git a/Vagrant Manager/Vagrant Manager-Info.plist b/Vagrant Manager/Vagrant Manager-Info.plist
index 3275c0e..0f48566 100644
--- a/Vagrant Manager/Vagrant Manager-Info.plist
+++ b/Vagrant Manager/Vagrant Manager-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.5.0
+ 2.5.1
CFBundleSignature
????
CFBundleVersion
- 2.5.0
+ 2.5.1
Configuration
${CONFIGURATION}
LSApplicationCategoryType