Added ~/Library/Application Support as user config path on Mac

master
Marius Kintel 2014-11-05 16:14:14 +04:00
parent a9cbabdbc2
commit 9205a378c4
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ std::string PlatformUtils::documentsPath()
std::string PlatformUtils::userConfigPath()
{
return "";
NSError *error;
NSURL *appSupportDir = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:&error];
return std::string([[appSupportDir path] UTF8String]) + std::string("/") + PlatformUtils::OPENSCAD_FOLDER_NAME;
}
void PlatformUtils::ensureStdIO(void) {}