Skip to content

Commit

Permalink
Use class applicationName variable instead of local.
Browse files Browse the repository at this point in the history
I keep getting an exception from Path.Combine after updating to 0.99 if applicationName parameter is null, as suggested since it's now optional.

I guess this is an oversight and the local applicationName is used to find the rootAppDirectory, even though the class member applicationName is correctly set beforehand.
  • Loading branch information
Theofanis Tokas committed May 15, 2015
1 parent e2a1a68 commit 75d78f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Squirrel/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public UpdateManager(string urlOrPath,
this.urlDownloader = urlDownloader ?? new FileDownloader();

if (rootDirectory != null) {
this.rootAppDirectory = Path.Combine(rootDirectory, applicationName);
this.rootAppDirectory = Path.Combine(rootDirectory, this.applicationName);
return;
}

this.rootAppDirectory = Path.Combine(rootDirectory ?? GetLocalAppDataDirectory(), applicationName);
this.rootAppDirectory = Path.Combine(rootDirectory ?? GetLocalAppDataDirectory(), this.applicationName);
}

public async Task<UpdateInfo> CheckForUpdate(bool ignoreDeltaUpdates = false, Action<int> progress = null)
Expand Down Expand Up @@ -273,4 +273,4 @@ static string getUpdateExe()
return target.FullName;
}
}
}
}

0 comments on commit 75d78f4

Please sign in to comment.