зеркало из https://github.com/mozilla/gecko-dev.git
Bug 620931 part 4 - Fix resource://app/ to always point to the same as resource:///. r=bsmedberg
This commit is contained in:
Родитель
7de58a1cfa
Коммит
addaf9f17c
|
@ -76,6 +76,7 @@ static nsResProtocolHandler *gResHandler = nsnull;
|
|||
static PRLogModuleInfo *gResLog;
|
||||
#endif
|
||||
|
||||
#define kAPP NS_LITERAL_CSTRING("app")
|
||||
#define kGRE NS_LITERAL_CSTRING("gre")
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -180,6 +181,12 @@ nsResProtocolHandler::Init()
|
|||
rv = SetSubstitution(EmptyCString(), uri);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
//
|
||||
// make resource://app/ point to the application directory or omnijar
|
||||
//
|
||||
rv = SetSubstitution(kAPP, uri);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
//
|
||||
// make resource://gre/ point to the GRE directory
|
||||
//
|
||||
|
|
|
@ -301,9 +301,6 @@ nsXREDirProvider::GetFile(const char* aProperty, PRBool* aPersistent,
|
|||
if (NS_SUCCEEDED(rv))
|
||||
file = lf;
|
||||
}
|
||||
else if (!strcmp(aProperty, "resource:app")) {
|
||||
rv = GetAppDir()->Clone(getter_AddRefs(file));
|
||||
}
|
||||
|
||||
else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) {
|
||||
return mProfileDir->Clone(aFile);
|
||||
|
|
Загрузка…
Ссылка в новой задаче