зеркало из https://github.com/mozilla/pjs.git
Bug 704230 - Use nsXREAppData instead of extracting and reading back in files. Temp workaround. r=blassey
--HG-- extra : rebase_source : 7e0e094301ddce820ee2544c7db71af0647b47f5
This commit is contained in:
Родитель
670e11964f
Коммит
49b2281f8e
|
@ -687,6 +687,7 @@ function cleanupActiveUpdate() {
|
|||
* the application directory.
|
||||
*/
|
||||
function getLocale() {
|
||||
|
||||
if (gLocale)
|
||||
return gLocale;
|
||||
|
||||
|
@ -694,11 +695,10 @@ function getLocale() {
|
|||
if (!localeFile.exists())
|
||||
localeFile = FileUtils.getFile(KEY_GRED, [FILE_UPDATE_LOCALE]);
|
||||
|
||||
if (!localeFile.exists())
|
||||
throw Components.Exception(FILE_UPDATE_LOCALE + " file doesn't exist in " +
|
||||
"either the " + KEY_APPDIR + " or " + KEY_GRED +
|
||||
" directories", Cr.NS_ERROR_FILE_NOT_FOUND);
|
||||
|
||||
if (!localeFile.exists()) {
|
||||
// XXX temp workaround. see bug 704230
|
||||
return "en-US";
|
||||
}
|
||||
gLocale = readStringFromFile(localeFile);
|
||||
LOG("getLocale - getting locale from file: " + localeFile.path +
|
||||
", locale: " + gLocale);
|
||||
|
|
Загрузка…
Ссылка в новой задаче