r=bnesse, sr=jst
OS/2 only - skip over EOF character on JS files in prefs


git-svn-id: svn://10.0.0.236/trunk@123720 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2002-06-20 21:37:21 +00:00
parent 4990bc8a8d
commit 7e4d76ba50

View File

@@ -447,6 +447,11 @@ static nsresult openPrefFile(nsIFile* aFile, PRBool aIsErrorFatal,
PRUint32 amtRead = 0;
rv = inStr->Read(readBuf, fileSize, &amtRead);
NS_ASSERTION((amtRead == fileSize), "failed to read the entire prefs file!!");
#ifdef XP_OS2 /* OS/2 workaround - our system editor adds an EOF character */
if (readBuf[amtRead - 1] == 0x1A) {
amtRead--;
}
#endif
if (NS_SUCCEEDED(rv)) {
if (!PREF_EvaluateConfigScript(readBuf, amtRead, nsnull, aIsGlobalContext, PR_TRUE,
aSkipFirstLine))