mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
bustage fix for standalone, not part of build
This commit is contained in:
parent
ddb7607e00
commit
d7b78fb9fb
@ -44,8 +44,8 @@
|
||||
#ifdef TX_EXE
|
||||
//- Constants -/
|
||||
|
||||
const String URIUtils::HTTP_PROTOCOL = "http";
|
||||
const String URIUtils::FILE_PROTOCOL = "file";
|
||||
const String URIUtils::HTTP_PROTOCOL("http");
|
||||
const String URIUtils::FILE_PROTOCOL("file");
|
||||
const char URIUtils::HREF_PATH_SEP = '/';
|
||||
const char URIUtils::DEVICE_SEP = '|';
|
||||
const char URIUtils::PORT_SEP = ':';
|
||||
@ -76,9 +76,9 @@ istream* URIUtils::getInputStream
|
||||
}
|
||||
else {
|
||||
// Try local files
|
||||
char* fchars = new char[href.length()+1];
|
||||
inStream = new ifstream(href.toCharArray(fchars), ios::in);
|
||||
delete fchars;
|
||||
char* fchars = href.toCharArray();
|
||||
inStream = new ifstream(fchars, ios::in);
|
||||
delete [] fchars;
|
||||
}
|
||||
delete uri;
|
||||
|
||||
@ -170,12 +170,12 @@ void URIUtils::resolveHref(const String& href, const String& base,
|
||||
}
|
||||
else {
|
||||
// Try local files
|
||||
char* xHrefChars = new char[xHref.length()+1];
|
||||
ifstream inFile(xHref.toCharArray(xHrefChars), ios::in);
|
||||
char* xHrefChars = xHref.toCharArray();
|
||||
ifstream inFile(xHrefChars, ios::in);
|
||||
if ( inFile ) dest.append(xHref);
|
||||
else dest.append(href);
|
||||
inFile.close();
|
||||
delete xHrefChars;
|
||||
delete [] xHrefChars;
|
||||
}
|
||||
delete uri;
|
||||
delete newUri;
|
||||
@ -208,9 +208,9 @@ istream* URIUtils::openStream(ParsedURI* uri) {
|
||||
|
||||
istream* inStream = 0;
|
||||
if ( FILE_PROTOCOL.isEqual(uri->protocol) ) {
|
||||
char* fchars = new char[uri->path.length()+1];
|
||||
ifstream* inFile = new ifstream(uri->path.toCharArray(fchars), ios::in);
|
||||
delete fchars;
|
||||
char* fchars = uri->path.toCharArray();
|
||||
ifstream* inFile = new ifstream(fchars, ios::in);
|
||||
delete [] fchars;
|
||||
inStream = inFile;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user