Fix |#ifdef TARGET_CARBON| assertions for bug 104651 to fix blocker bug 108911 (TARGET_CARBON changes only).

This commit is contained in:
dbaron%fas.harvard.edu 2001-11-07 22:08:31 +00:00
Родитель 325c59d793
Коммит d8d5227f01
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -1604,8 +1604,8 @@ nsLocalFile::GetPath(char **_retval)
FSSpec parentDirSpec; FSSpec parentDirSpec;
err = GetParentFolderSpec(mResolvedSpec, parentDirSpec); err = GetParentFolderSpec(mResolvedSpec, parentDirSpec);
if (err == noErr) { if (err == noErr) {
nsDependentCString leafName((char *)&mResolvedSpec.name[1], PRUint32(mResolvedSpec.name[0])); const char *startPtr = (const char*)&mResolvedSpec.name[1];
nsFSStringConversionMac::FSToUCS(leafName, ucPathString); nsFSStringConversionMac::FSToUCS(Substring(startPtr, startPtr + PRUint32(mResolvedSpec.name[0])), ucPathString);
err = ::FSpMakeFSRef(&parentDirSpec, &nodeRef); err = ::FSpMakeFSRef(&parentDirSpec, &nodeRef);
} }
} }
@ -1623,8 +1623,8 @@ nsLocalFile::GetPath(char **_retval)
{ {
if (catalogInfo.nodeFlags & kFSNodeIsDirectoryMask) if (catalogInfo.nodeFlags & kFSNodeIsDirectoryMask)
nodeName.unicode[nodeName.length++] = PRUnichar(':'); nodeName.unicode[nodeName.length++] = PRUnichar(':');
nsDependentString nodeNameStr((PRUnichar *)nodeName.unicode, (PRUint32)nodeName.length); const PRUnichar* nodeNameUni = (const PRUnichar*) nodeName.unicode;
ucPathString.Insert(nodeNameStr, 0); ucPathString.Insert(Substring(nodeNameUni, nodeNameUni + nodeName.length), 0);
nodeRef = parentRef; nodeRef = parentRef;
} }
} }