]> git.sesse.net Git - vlc/blobdiff - src/config/dirs.c
config: Change the caching directories of VLC Mac OS X to Library/Caches/VLC
[vlc] / src / config / dirs.c
index deb789ecee10a7faea920a2b1f0fa673736cb695..a241ff57becb929f02709d3190d587d339ab708c 100644 (file)
@@ -54,6 +54,7 @@
 # define DIR_SHARE "share"
 #endif
 
+
 /**
  * config_GetDataDir: find directory where shared data is installed
  *
@@ -232,5 +233,15 @@ char *config_GetUserDataDir( void )
  */
 char *config_GetCacheDir( void )
 {
+#if defined(__APPLE__)
+    char *psz_dir;
+    const char *psz_parent = GetDir (true, false);
+
+    if( asprintf( &psz_dir, "%s" DIR_SEP CACHES_DIR, psz_parent ) == -1 )
+        psz_dir = NULL;
+
+    return psz_dir;
+#else
     return config_GetFooDir ("CACHE", ".cache");
+#endif
 }