Commit 9e8755ae authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

config: Change the caching directories of VLC Mac OS X to Library/Caches/VLC

parent fffd3cd1
...@@ -59,6 +59,7 @@ int ConfigStringToKey( const char * ); ...@@ -59,6 +59,7 @@ int ConfigStringToKey( const char * );
# define CONFIG_DIR "config/settings/VideoLAN Client" # define CONFIG_DIR "config/settings/VideoLAN Client"
#elif defined (__APPLE__) #elif defined (__APPLE__)
# define CONFIG_DIR "Library/Preferences/VLC" # define CONFIG_DIR "Library/Preferences/VLC"
# define CACHES_DIR "Library/Caches/VLC"
#elif defined( WIN32 ) || defined( UNDER_CE ) #elif defined( WIN32 ) || defined( UNDER_CE )
# define CONFIG_DIR "vlc" # define CONFIG_DIR "vlc"
#else #else
...@@ -66,6 +67,8 @@ int ConfigStringToKey( const char * ); ...@@ -66,6 +67,8 @@ int ConfigStringToKey( const char * );
#endif #endif
#define CONFIG_FILE "vlcrc" #define CONFIG_FILE "vlcrc"
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif # endif
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
# define DIR_SHARE "share" # define DIR_SHARE "share"
#endif #endif
/** /**
* config_GetDataDir: find directory where shared data is installed * config_GetDataDir: find directory where shared data is installed
* *
...@@ -232,5 +233,15 @@ char *config_GetUserDataDir( void ) ...@@ -232,5 +233,15 @@ char *config_GetUserDataDir( void )
*/ */
char *config_GetCacheDir( 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"); return config_GetFooDir ("CACHE", ".cache");
#endif
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment