fixes bug 142870 "nsIFile should use UCS-2 instead of UTF-8"

r=dougt sr=alecf
This commit is contained in:
darin%netscape.com 2006-05-17 02:34:10 +00:00
Родитель 930047eb34
Коммит ff1e65cce0
1 изменённых файлов: 5 добавлений и 10 удалений

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

@ -171,9 +171,7 @@ inFileSearch::GetStringResultAt(PRInt32 aIndex, nsAString& _retval)
}
if (file) {
nsCAutoString temp;
mLastResult->GetPath(temp);
_retval = NS_ConvertUTF8toUCS2(temp);
mLastResult->GetPath(_retval);
if (mReturnRelativePaths)
MakePathRelative(_retval);
} else {
@ -543,12 +541,10 @@ inFileSearch::GetNextDirectory(nsISimpleEnumerator* aEnum)
PRBool
inFileSearch::MatchFile(nsIFile* aFile)
{
nsCAutoString fileName;
nsAutoString fileName;
aFile->GetLeafName(fileName);
NS_ConvertUTF8toUCS2 temp(fileName);
PRUnichar* fileNameUnicode = ToNewUnicode(temp);
PRUnichar* fileNameUnicode = ToNewUnicode(fileName);
PRBool match;
@ -610,9 +606,8 @@ inFileSearch::MakePathRelative(nsAString& aPath)
{
// get an nsAutoString version of the search path
nsCAutoString temp;
mSearchPath->GetPath(temp);
NS_ConvertUTF8toUCS2 searchPath(temp);
nsAutoString searchPath;
mSearchPath->GetPath(searchPath);
nsAutoString result;
PRUint32 len = searchPath.Length();