Bug 704230 - Use nsXREAppData instead of extracting and reading back in files. Temp workaround. r=blassey

--HG--
extra : rebase_source : 19fb78e15a6f6bb6f6ac61dd721409a9710a30d0
This commit is contained in:
Doug Turner 2011-11-21 11:40:10 -08:00
parent 5c0f4a2a3b
commit 9a2db500c1

View File

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