mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-26 05:41:28 +00:00
50faf07f00
* Move class to get the app data directory to a new StandardDirs class. * Setup an auto-release pool at the start/end of main() to catch objects allocated outside of the updater dialog.
18 lines
458 B
Text
18 lines
458 B
Text
#include <Foundation/Foundation.h>
|
|
|
|
#include "StandardDirs.h"
|
|
|
|
std::string StandardDirs::applicationSupportFolderPath()
|
|
{
|
|
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
|
|
NSUserDomainMask,
|
|
true /* expand tildes */);
|
|
|
|
for (unsigned int i=0; i < [paths count]; i++)
|
|
{
|
|
NSString* path = [paths objectAtIndex:i];
|
|
return std::string([path UTF8String]);
|
|
}
|
|
return std::string();
|
|
}
|
|
|