Commit ca621cd7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

config: rename VLC_DATA_DIR to VLC_USERDATA_DIR

...to avoid confusion going forward. The name matches the VLC Lua name.
parent 99ad3da5
......@@ -301,7 +301,7 @@ typedef enum vlc_userdir
{
VLC_HOME_DIR, /* User's home */
VLC_CONFIG_DIR, /* VLC-specific configuration directory */
VLC_DATA_DIR, /* VLC-specific data directory */
VLC_USERDATA_DIR, /* VLC-specific data directory */
VLC_CACHE_DIR, /* VLC-specific user cached data directory */
/* Generic directories (same as XDG) */
VLC_DESKTOP_DIR=0x80,
......
......@@ -104,7 +104,7 @@ void libvlc_media_library_retain( libvlc_media_library_t * p_mlib )
**************************************************************************/
int libvlc_media_library_load( libvlc_media_library_t * p_mlib )
{
char *psz_datadir = config_GetUserDir( VLC_DATA_DIR );
char *psz_datadir = config_GetUserDir( VLC_USERDATA_DIR );
char * psz_uri;
if( psz_datadir == NULL
......
......@@ -197,7 +197,7 @@ static void messages_callback_handler( void *p_opaque, const char *psz_message )
static char* get_arib_base_dir()
{
char *psz_data_dir = config_GetUserDir( VLC_DATA_DIR );
char *psz_data_dir = config_GetUserDir( VLC_USERDATA_DIR );
if( psz_data_dir == NULL )
{
return NULL;
......
......@@ -217,7 +217,7 @@ bool OS2Factory::init()
changeCursor( kDefaultArrow );
// Initialize the resource path
char *datadir = config_GetUserDir( VLC_DATA_DIR );
char *datadir = config_GetUserDir( VLC_USER_DATA_DIR );
m_resourcePath.push_back( (std::string)datadir + "\\skins" );
free( datadir );
datadir = config_GetDataDir();
......
......@@ -233,7 +233,7 @@ bool Win32Factory::init()
OleInitialize( NULL );
// Initialize the resource path
char *datadir = config_GetUserDir( VLC_DATA_DIR );
char *datadir = config_GetUserDir( VLC_USERDATA_DIR );
m_resourcePath.push_back( (std::string)datadir + "\\skins" );
free( datadir );
datadir = config_GetDataDir();
......
......@@ -86,7 +86,7 @@ bool X11Factory::init()
ConnectionNumber( pDisplay ) );
// Initialize the resource path
char *datadir = config_GetUserDir( VLC_DATA_DIR );
char *datadir = config_GetUserDir( VLC_USERDATA_DIR );
m_resourcePath.push_back( (std::string)datadir + "/skins2" );
free( datadir );
m_resourcePath.push_back( (std::string)"share/skins2" );
......
......@@ -112,7 +112,7 @@ static int vlclua_datadir( lua_State *L )
static int vlclua_userdatadir( lua_State *L )
{
char *dir = config_GetUserDir( VLC_DATA_DIR );
char *dir = config_GetUserDir( VLC_USERDATA_DIR );
lua_pushstring( L, dir );
free( dir );
return 1;
......
......@@ -220,7 +220,7 @@ int vlclua_dir_list(const char *luadirname, char ***restrict listp)
*listp = list;
/* Lua scripts in user-specific data directory */
list = vlclua_dir_list_append(list, config_GetUserDir(VLC_DATA_DIR),
list = vlclua_dir_list_append(list, config_GetUserDir(VLC_USERDATA_DIR),
luadirname);
char *libdir = config_GetLibDir();
......
......@@ -100,7 +100,7 @@ static char * getAddonInstallDir( addon_type_t t )
{
const char *psz_subdir = NULL;
char *psz_dir;
char *psz_userdir = config_GetUserDir( VLC_DATA_DIR );
char *psz_userdir = config_GetUserDir( VLC_USERDATA_DIR );
if ( !psz_userdir ) return NULL;
for ( unsigned int i=0; i< ARRAY_SIZE(addons_dirs); i++ )
......@@ -542,7 +542,7 @@ static int WriteCatalog( addons_storage_t *p_storage,
char *psz_file;
char *psz_file_tmp;
char *psz_tempstring;
char *psz_userdir = config_GetUserDir( VLC_DATA_DIR );
char *psz_userdir = config_GetUserDir( VLC_USERDATA_DIR );
if ( !psz_userdir ) return VLC_ENOMEM;
if ( asprintf( &psz_file, "%s%s", psz_userdir, ADDONS_CATALOG ) < 1 )
......@@ -671,7 +671,7 @@ static int WriteCatalog( addons_storage_t *p_storage,
static int LoadCatalog( addons_finder_t *p_finder )
{
char *psz_path;
char * psz_userdir = config_GetUserDir( VLC_DATA_DIR );
char * psz_userdir = config_GetUserDir( VLC_USERDATA_DIR );
if ( !psz_userdir ) return VLC_ENOMEM;
if ( asprintf( &psz_path, "%s%s", psz_userdir, ADDONS_CATALOG ) < 1 )
......
......@@ -273,7 +273,7 @@ char *config_GetUserDir (vlc_userdir_t type)
{
switch (type)
{
case VLC_DATA_DIR:
case VLC_USERDATA_DIR:
return config_GetHomeDir(".share",
"/sdcard/Android/data/org.videolan.vlc");
case VLC_CACHE_DIR:
......
......@@ -126,7 +126,7 @@ static char *getAppDependentDir(vlc_userdir_t type)
psz_path = "%s/Library/Preferences/%s";
break;
case VLC_TEMPLATES_DIR:
case VLC_DATA_DIR:
case VLC_USERDATA_DIR:
psz_path = "%s/Library/Application Support/%s";
break;
case VLC_CACHE_DIR:
......@@ -172,7 +172,7 @@ char *config_GetUserDir (vlc_userdir_t type)
switch (type) {
case VLC_CONFIG_DIR:
case VLC_TEMPLATES_DIR:
case VLC_DATA_DIR:
case VLC_USERDATA_DIR:
case VLC_CACHE_DIR:
return getAppDependentDir(type);
......
......@@ -79,7 +79,7 @@ char *config_GetUserDir (vlc_userdir_t type)
{
case VLC_HOME_DIR:
case VLC_CONFIG_DIR:
case VLC_DATA_DIR:
case VLC_USERDATA_DIR:
case VLC_CACHE_DIR:
case VLC_DESKTOP_DIR:
case VLC_DOWNLOAD_DIR:
......
......@@ -129,7 +129,7 @@ static void input_item_subitem_tree_added( const vlc_event_t * p_event,
int playlist_MLLoad( playlist_t *p_playlist )
{
char *psz_datadir = config_GetUserDir( VLC_DATA_DIR );
char *psz_datadir = config_GetUserDir( VLC_USERDATA_DIR );
if( !psz_datadir ) /* XXX: This should never happen */
{
msg_Err( p_playlist, "no data directory, cannot load media library") ;
......@@ -180,7 +180,7 @@ int playlist_MLDump( playlist_t *p_playlist )
{
char *psz_temp;
psz_temp = config_GetUserDir( VLC_DATA_DIR );
psz_temp = config_GetUserDir( VLC_USERDATA_DIR );
if( !psz_temp ) /* XXX: This should never happen */
{
......
......@@ -216,7 +216,7 @@ char *config_GetUserDir (vlc_userdir_t type)
break;
case VLC_CONFIG_DIR:
return config_GetAppDir ("CONFIG", ".config");
case VLC_DATA_DIR:
case VLC_USERDATA_DIR:
return config_GetAppDir ("DATA", ".local/share");
case VLC_CACHE_DIR:
return config_GetAppDir ("CACHE", ".cache");
......
......@@ -259,7 +259,7 @@ char *config_GetUserDir (vlc_userdir_t type)
case VLC_HOME_DIR:
return config_GetShellDir (CSIDL_PERSONAL);
case VLC_CONFIG_DIR:
case VLC_DATA_DIR:
case VLC_USERDATA_DIR:
return config_GetAppDir ();
case VLC_CACHE_DIR:
#if !VLC_WINSTORE_APP
......
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