private void DownloadIndexFile(string archive, int i)
{
try
{
string file = config.CDNPath + "/data/" + archive.Substring(0, 2) + "/" + archive.Substring(2, 2) + "/" + archive + ".index";
string url = "http://" + config.CDNHost + "/" + file;
Stream stream = Cache.OpenFile(file, url, false);
if (stream != null)
{
ParseIndex(stream, i);
}
else
{
using (var fs = downloader.OpenFile(url))
ParseIndex(fs, i);
}
}
catch
{
throw new Exception("DownloadFile failed!");
}
}