catch worst-case
This commit is contained in:
parent
3cdc8a0172
commit
91442e7edd
1 changed files with 8 additions and 1 deletions
|
@ -174,11 +174,18 @@ namespace EnvyUpdate
|
|||
//protocol agnostic url
|
||||
gpuURL = "https:" + gpuURL;
|
||||
}
|
||||
else
|
||||
else if (gpuURL.StartsWith("driverResults.aspx"))
|
||||
{
|
||||
//relative url
|
||||
gpuURL = "https://www.nvidia.com/Download/" + gpuURL;
|
||||
}
|
||||
else
|
||||
{
|
||||
//panic.
|
||||
MessageBox.Show("ERROR: Invalid API response from Nvidia. Please file an issue on GitHub.");
|
||||
Environment.Exit(10);
|
||||
}
|
||||
|
||||
string pContent = c.DownloadString(gpuURL);
|
||||
var pattern = @"Windows\/\d{3}\.\d{2}";
|
||||
Regex rgx = new Regex(pattern);
|
||||
|
|
Reference in a new issue