Fix Mac data dir finding.
Mostly affects release builds, ensure data dir located within the bundle is found correctly.
This commit is contained in:
parent
467783bd45
commit
4052c45ea3
1 changed files with 4 additions and 1 deletions
|
@ -2233,10 +2233,13 @@ string Options::platformDefaultRoot() const
|
|||
// look for a 'data' subdir
|
||||
CFURLRef dataDir = CFURLCreateCopyAppendingPathComponent(NULL, resourcesUrl, CFSTR("data"), true);
|
||||
|
||||
CFURLRef absoluteDataUrl = CFURLCopyAbsoluteURL(dataDir);
|
||||
|
||||
// now convert down to a path, and the a c-string
|
||||
CFStringRef path = CFURLCopyFileSystemPath(dataDir, kCFURLPOSIXPathStyle);
|
||||
CFStringRef path = CFURLCopyFileSystemPath(absoluteDataUrl, kCFURLPOSIXPathStyle);
|
||||
string root = CFStringGetCStringPtr(path, CFStringGetSystemEncoding());
|
||||
|
||||
CFRelease(absoluteDataUrl);
|
||||
CFRelease(resourcesUrl);
|
||||
CFRelease(dataDir);
|
||||
CFRelease(path);
|
||||
|
|
Loading…
Add table
Reference in a new issue