don't be fooled by a <host> entry in an old contents.xml file

This commit is contained in:
David Rose 2010-06-17 22:15:38 +00:00
parent d84833afb2
commit ba6b73fab9
2 changed files with 5 additions and 0 deletions

View File

@ -184,6 +184,7 @@ begin() {
url += '/';
}
_download_url_prefix = url;
_standard_url_prefix = url;
nout << "Plugin is built with " << PANDA_PACKAGE_HOST_URL << "\n";
if (!is_plugin_loaded() && !_failed) {
@ -202,6 +203,7 @@ begin() {
if (!success) {
// Go download the latest contents.xml file.
_download_url_prefix = _standard_url_prefix;
ostringstream strm;
strm << _download_url_prefix << "contents.xml";
@ -1168,6 +1170,8 @@ start_download(const string &url, PPDownloadRequest *req) {
////////////////////////////////////////////////////////////////////
bool PPInstance::
read_contents_file(const string &contents_filename, bool fresh_download) {
_download_url_prefix = _standard_url_prefix;
TiXmlDocument doc(contents_filename.c_str());
if (!doc.LoadFile()) {
return false;

View File

@ -134,6 +134,7 @@ private:
Tokens _tokens;
string _root_dir;
string _standard_url_prefix;
string _download_url_prefix;
typedef vector<string> Mirrors;
Mirrors _mirrors;