Allow osx app bundle running inside unicode directory

This commit is contained in:
Benau 2019-07-06 16:33:55 +08:00
parent 2818a1870e
commit 9e6e31cfb2

View File

@ -90,7 +90,7 @@ bool macSetBundlePathIfRelevant(std::string& data_dir)
CFStringRef cf_string_ref = CFURLCopyFileSystemPath(main_bundle_URL, CFStringRef cf_string_ref = CFURLCopyFileSystemPath(main_bundle_URL,
kCFURLPOSIXPathStyle); kCFURLPOSIXPathStyle);
assert(cf_string_ref); assert(cf_string_ref);
CFStringGetCString(cf_string_ref, path, 1024, kCFStringEncodingASCII); CFStringGetCString(cf_string_ref, path, 1024, kCFStringEncodingUTF8);
CFRelease(main_bundle_URL); CFRelease(main_bundle_URL);
CFRelease(cf_string_ref); CFRelease(cf_string_ref);