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:
Doug Turner 2011-11-21 11:40:10 -08:00
Родитель 0acd8e0e00
Коммит 0ab1a1dbde
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -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);