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-25 01:06:42 +00:00
Родитель 7c3fed2a85
Коммит 8ecfc976fc
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