Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
09bd8efc
Commit
09bd8efc
authored
Aug 24, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove config_GetUserConfDir
parent
821f7242
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
18 deletions
+15
-18
include/vlc_configuration.h
include/vlc_configuration.h
+3
-2
modules/misc/lua/libs/misc.c
modules/misc/lua/libs/misc.c
+1
-1
src/config/dirs.c
src/config/dirs.c
+8
-11
src/config/file.c
src/config/file.c
+3
-3
src/libvlccore.sym
src/libvlccore.sym
+0
-1
No files found.
include/vlc_configuration.h
View file @
09bd8efc
...
@@ -214,14 +214,15 @@ VLC_EXPORT( int, __config_SaveConfigFile, ( vlc_object_t *, const char * ) );
...
@@ -214,14 +214,15 @@ VLC_EXPORT( int, __config_SaveConfigFile, ( vlc_object_t *, const char * ) );
VLC_EXPORT
(
void
,
__config_ResetAll
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__config_ResetAll
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
module_config_t
*
,
config_FindConfig
,(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
module_config_t
*
,
config_FindConfig
,(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
const
char
*
,
config_GetDataDir
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
const
char
*
,
config_GetDataDir
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
const
char
*
,
config_GetConfDir
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
const
char
*
,
config_GetConfDir
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
config_GetUserConfDir
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
config_GetUserDataDir
,
(
void
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
config_GetUserDataDir
,
(
void
)
LIBVLC_USED
);
typedef
enum
vlc_userdir
{
typedef
enum
vlc_userdir
{
/* User's home */
VLC_HOME_DIR
,
VLC_HOME_DIR
,
/* VLC configuration directory */
VLC_CONFIG_DIR
,
}
vlc_userdir_t
;
}
vlc_userdir_t
;
VLC_EXPORT
(
char
*
,
config_GetUserDir
,
(
vlc_userdir_t
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
config_GetUserDir
,
(
vlc_userdir_t
)
LIBVLC_USED
);
...
...
modules/misc/lua/libs/misc.c
View file @
09bd8efc
...
@@ -134,7 +134,7 @@ static int vlclua_homedir( lua_State *L )
...
@@ -134,7 +134,7 @@ static int vlclua_homedir( lua_State *L )
static
int
vlclua_configdir
(
lua_State
*
L
)
static
int
vlclua_configdir
(
lua_State
*
L
)
{
{
char
*
dir
=
config_GetUser
ConfDir
(
);
char
*
dir
=
config_GetUser
Dir
(
VLC_CONFIG_DIR
);
lua_pushstring
(
L
,
dir
);
lua_pushstring
(
L
,
dir
);
free
(
dir
);
free
(
dir
);
return
1
;
return
1
;
...
...
src/config/dirs.c
View file @
09bd8efc
...
@@ -248,14 +248,6 @@ static char *config_GetAppDir (const char *xdg_name, const char *xdg_default)
...
@@ -248,14 +248,6 @@ static char *config_GetAppDir (const char *xdg_name, const char *xdg_default)
return
psz_dir
;
return
psz_dir
;
}
}
/**
* Get the user's VLC configuration directory
*/
char
*
config_GetUserConfDir
(
void
)
{
return
config_GetAppDir
(
"CONFIG"
,
".config"
);
}
/**
/**
* Get the user's VLC data directory
* Get the user's VLC data directory
* (used for stuff like the skins, custom lua modules, ...)
* (used for stuff like the skins, custom lua modules, ...)
...
@@ -286,7 +278,12 @@ char *config_GetCacheDir( void )
...
@@ -286,7 +278,12 @@ char *config_GetCacheDir( void )
char
*
config_GetUserDir
(
vlc_userdir_t
type
)
char
*
config_GetUserDir
(
vlc_userdir_t
type
)
{
{
char
*
home
=
config_GetHomeDir
();
switch
(
type
)
(
void
)
type
;
{
return
home
;
case
VLC_HOME_DIR
:
return
config_GetHomeDir
();
case
VLC_CONFIG_DIR
:
return
config_GetAppDir
(
"CONFIG"
,
".config"
);
}
assert
(
0
);
}
}
src/config/file.c
View file @
09bd8efc
...
@@ -59,7 +59,7 @@ static char *config_GetConfigFile( vlc_object_t *obj )
...
@@ -59,7 +59,7 @@ static char *config_GetConfigFile( vlc_object_t *obj )
char
*
psz_file
=
config_GetPsz
(
obj
,
"config"
);
char
*
psz_file
=
config_GetPsz
(
obj
,
"config"
);
if
(
psz_file
==
NULL
)
if
(
psz_file
==
NULL
)
{
{
char
*
psz_dir
=
config_GetUser
ConfDir
(
);
char
*
psz_dir
=
config_GetUser
Dir
(
VLC_CONFIG_DIR
);
if
(
asprintf
(
&
psz_file
,
"%s"
DIR_SEP
CONFIG_FILE
,
psz_dir
)
==
-
1
)
if
(
asprintf
(
&
psz_file
,
"%s"
DIR_SEP
CONFIG_FILE
,
psz_dir
)
==
-
1
)
psz_file
=
NULL
;
psz_file
=
NULL
;
...
@@ -385,8 +385,8 @@ config_Write (FILE *file, const char *desc, const char *type,
...
@@ -385,8 +385,8 @@ config_Write (FILE *file, const char *desc, const char *type,
static
int
config_PrepareDir
(
vlc_object_t
*
obj
)
static
int
config_PrepareDir
(
vlc_object_t
*
obj
)
{
{
char
*
psz_configdir
=
config_GetUser
ConfDir
(
);
char
*
psz_configdir
=
config_GetUser
Dir
(
VLC_CONFIG_DIR
);
if
(
psz_configdir
==
NULL
)
/* XXX: This should never happen */
if
(
psz_configdir
==
NULL
)
return
-
1
;
return
-
1
;
int
ret
=
config_CreateDir
(
obj
,
psz_configdir
);
int
ret
=
config_CreateDir
(
obj
,
psz_configdir
);
...
...
src/libvlccore.sym
View file @
09bd8efc
...
@@ -58,7 +58,6 @@ config_GetUserDir
...
@@ -58,7 +58,6 @@ config_GetUserDir
__config_GetInt
__config_GetInt
__config_GetPsz
__config_GetPsz
__config_GetType
__config_GetType
config_GetUserConfDir
config_GetUserDataDir
config_GetUserDataDir
__config_PutFloat
__config_PutFloat
__config_PutInt
__config_PutInt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment