Fix crash on attempt to save cached OpenGL nodes on OS X

Root permissions are required to be able to create directories inside /Library/Application Support
So user's ~/Library/Application Support is used to store cached nodes
This commit is contained in:
alexey.lysiuk 2014-06-01 15:12:41 +03:00
parent 90ac160b70
commit 96e4cb90b7

View file

@ -335,7 +335,7 @@ FString M_GetCachePath(bool create)
char pathstr[PATH_MAX];
FSRef folder;
if (noErr == FSFindFolder(kLocalDomain, kApplicationSupportFolderType, create ? kCreateFolder : 0, &folder) &&
if (noErr == FSFindFolder(kUserDomain, kApplicationSupportFolderType, create ? kCreateFolder : 0, &folder) &&
noErr == FSRefMakePath(&folder, (UInt8*)pathstr, PATH_MAX))
{
path = pathstr;