Browse Source

darwin: dirs: return cache dir for tvOS HOME

No directory is writable on tvOS except the cache folder, so return it
as HOME to ensure we can write in our HOME.
Alexandre Janniaux 4 years ago
parent
commit
3f5fb8e9aa
  1. 6
      src/darwin/dirs.m

6
src/darwin/dirs.m

@ -155,6 +155,12 @@ char *config_GetSysPath(vlc_sysdir_t type, const char *filename)
static char *config_GetHomeDir (void)
{
#ifdef TARGET_OS_TV
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cacheDirectory = [paths objectAtIndex:0];
return strdup([cacheDirectory UTF8String]);
#endif
const char *home = getenv ("HOME");
if (home == NULL)

Loading…
Cancel
Save