bustage fix from bug 378581, patch by Dave Camp <dcamp@mozilla.com>, r=me

This commit is contained in:
ted.mielczarek@gmail.com 2007-07-24 18:06:11 -07:00
Родитель c712b2c44e
Коммит f3d5502a13
1 изменённых файлов: 7 добавлений и 6 удалений

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

@ -284,14 +284,15 @@ bool UIGetSettingsPath(const string& vendor,
const string& product,
string& settingsPath)
{
NSArray* paths;
paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
NSUserDomainMask,
YES);
if ([paths count] < 1)
FSRef foundRef;
OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType,
kCreateFolder, &foundRef);
if (err != noErr)
return false;
NSString* destPath = [paths objectAtIndex:0];
unsigned char path[PATH_MAX];
FSRefMakePath(&foundRef, path, sizeof(path));
NSString* destPath = [NSString stringWithUTF8String:reinterpret_cast<char*>(path)];
// Note that MacOS ignores the vendor when creating the profile hierarchy -
// all application preferences directories live alongside one another in