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
8210d67f
Commit
8210d67f
authored
Aug 24, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove config_GetUserDataDir()...
...and fix a memory leak in LUA
parent
09bd8efc
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
24 deletions
+17
-24
include/vlc_configuration.h
include/vlc_configuration.h
+5
-6
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+1
-1
modules/gui/skins2/x11/x11_factory.cpp
modules/gui/skins2/x11/x11_factory.cpp
+1
-1
modules/misc/gnutls.c
modules/misc/gnutls.c
+1
-1
modules/misc/lua/libs/misc.c
modules/misc/lua/libs/misc.c
+3
-1
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+1
-1
src/config/dirs.c
src/config/dirs.c
+2
-9
src/control/media_library.c
src/control/media_library.c
+1
-1
src/libvlccore.sym
src/libvlccore.sym
+0
-1
src/playlist/loadsave.c
src/playlist/loadsave.c
+2
-2
No files found.
include/vlc_configuration.h
View file @
8210d67f
...
@@ -216,13 +216,12 @@ VLC_EXPORT( void, __config_ResetAll, ( vlc_object_t * ) );
...
@@ -216,13 +216,12 @@ 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_GetUserDataDir
,
(
void
)
LIBVLC_USED
);
typedef
enum
vlc_userdir
{
typedef
enum
vlc_userdir
/* User's home */
{
VLC_HOME_DIR
,
VLC_HOME_DIR
,
/* User's home */
/* VLC
configuration directory */
VLC_CONFIG_DIR
,
/* VLC-specific
configuration directory */
VLC_
CONFIG_DIR
,
VLC_
DATA_DIR
,
/* VLC-specific data directory */
}
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/gui/skins2/win32/win32_factory.cpp
View file @
8210d67f
...
@@ -225,7 +225,7 @@ bool Win32Factory::init()
...
@@ -225,7 +225,7 @@ bool Win32Factory::init()
}
}
// Initialize the resource path
// Initialize the resource path
char
*
datadir
=
config_GetUserD
ataDir
(
);
char
*
datadir
=
config_GetUserD
ir
(
VLC_DATA_DIR
);
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"
\\
skins"
);
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"
\\
skins"
);
free
(
datadir
);
free
(
datadir
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
...
...
modules/gui/skins2/x11/x11_factory.cpp
View file @
8210d67f
...
@@ -75,7 +75,7 @@ bool X11Factory::init()
...
@@ -75,7 +75,7 @@ bool X11Factory::init()
ConnectionNumber
(
pDisplay
)
);
ConnectionNumber
(
pDisplay
)
);
// Initialize the resource path
// Initialize the resource path
char
*
datadir
=
config_GetUserDataDir
();
char
*
datadir
=
config_GetUserDataDir
(
VLC_DATA_DIR
);
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"/skins2"
);
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"/skins2"
);
free
(
datadir
);
free
(
datadir
);
m_resourcePath
.
push_back
(
(
string
)
"share/skins2"
);
m_resourcePath
.
push_back
(
(
string
)
"share/skins2"
);
...
...
modules/misc/gnutls.c
View file @
8210d67f
...
@@ -675,7 +675,7 @@ static int OpenClient (vlc_object_t *obj)
...
@@ -675,7 +675,7 @@ static int OpenClient (vlc_object_t *obj)
goto
error
;
goto
error
;
}
}
char
*
userdir
=
config_Get
UserDataDir
(
);
char
*
userdir
=
config_Get
DataDir
(
VLC_DATA_DIR
);
if
(
userdir
!=
NULL
)
if
(
userdir
!=
NULL
)
{
{
char
path
[
strlen
(
userdir
)
+
sizeof
(
"/ssl/private"
)];
char
path
[
strlen
(
userdir
)
+
sizeof
(
"/ssl/private"
)];
...
...
modules/misc/lua/libs/misc.c
View file @
8210d67f
...
@@ -120,7 +120,9 @@ static int vlclua_datadir( lua_State *L )
...
@@ -120,7 +120,9 @@ static int vlclua_datadir( lua_State *L )
static
int
vlclua_userdatadir
(
lua_State
*
L
)
static
int
vlclua_userdatadir
(
lua_State
*
L
)
{
{
lua_pushstring
(
L
,
config_GetUserDataDir
()
);
char
*
dir
=
config_GetUserDir
(
VLC_DATA_DIR
);
lua_pushstring
(
L
,
dir
);
free
(
dir
);
return
1
;
return
1
;
}
}
...
...
modules/misc/lua/vlc.c
View file @
8210d67f
...
@@ -108,7 +108,7 @@ static int file_compare( const char **a, const char **b )
...
@@ -108,7 +108,7 @@ static int file_compare( const char **a, const char **b )
int
vlclua_dir_list
(
const
char
*
luadirname
,
char
**
ppsz_dir_list
)
int
vlclua_dir_list
(
const
char
*
luadirname
,
char
**
ppsz_dir_list
)
{
{
int
i
=
0
;
int
i
=
0
;
char
*
datadir
=
config_GetUserD
ataDir
(
);
char
*
datadir
=
config_GetUserD
ir
(
VLC_DATA_DIR
);
if
(
datadir
==
NULL
)
if
(
datadir
==
NULL
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
...
...
src/config/dirs.c
View file @
8210d67f
...
@@ -248,15 +248,6 @@ static char *config_GetAppDir (const char *xdg_name, const char *xdg_default)
...
@@ -248,15 +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 data directory
* (used for stuff like the skins, custom lua modules, ...)
*/
char
*
config_GetUserDataDir
(
void
)
{
return
config_GetAppDir
(
"DATA"
,
".local/share"
);
}
/**
/**
* Get the user's VLC cache directory
* Get the user's VLC cache directory
* (used for stuff like the modules cache, the album art cache, ...)
* (used for stuff like the modules cache, the album art cache, ...)
...
@@ -284,6 +275,8 @@ char *config_GetUserDir (vlc_userdir_t type)
...
@@ -284,6 +275,8 @@ char *config_GetUserDir (vlc_userdir_t type)
return
config_GetHomeDir
();
return
config_GetHomeDir
();
case
VLC_CONFIG_DIR
:
case
VLC_CONFIG_DIR
:
return
config_GetAppDir
(
"CONFIG"
,
".config"
);
return
config_GetAppDir
(
"CONFIG"
,
".config"
);
case
VLC_DATA_DIR
:
return
config_GetAppDir
(
"DATA"
,
".local/share"
);
}
}
assert
(
0
);
assert
(
0
);
}
}
src/control/media_library.c
View file @
8210d67f
...
@@ -108,7 +108,7 @@ void
...
@@ -108,7 +108,7 @@ void
libvlc_media_library_load
(
libvlc_media_library_t
*
p_mlib
,
libvlc_media_library_load
(
libvlc_media_library_t
*
p_mlib
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
char
*
psz_datadir
=
config_GetUserD
ataDir
(
);
char
*
psz_datadir
=
config_GetUserD
ir
(
VLC_DATA_DIR
);
char
*
psz_uri
;
char
*
psz_uri
;
if
(
!
psz_datadir
)
/* XXX: i doubt that this can ever happen */
if
(
!
psz_datadir
)
/* XXX: i doubt that this can ever happen */
...
...
src/libvlccore.sym
View file @
8210d67f
...
@@ -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_GetUserDataDir
__config_PutFloat
__config_PutFloat
__config_PutInt
__config_PutInt
__config_PutPsz
__config_PutPsz
...
...
src/playlist/loadsave.c
View file @
8210d67f
...
@@ -125,7 +125,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
...
@@ -125,7 +125,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
if
(
!
config_GetInt
(
p_playlist
,
"media-library"
)
)
if
(
!
config_GetInt
(
p_playlist
,
"media-library"
)
)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
psz_datadir
=
config_GetUserD
ataDir
(
);
psz_datadir
=
config_GetUserD
ir
(
VLC_DATA_DIR
);
if
(
!
psz_datadir
)
/* XXX: This should never happen */
if
(
!
psz_datadir
)
/* XXX: This should never happen */
{
{
...
@@ -208,7 +208,7 @@ int playlist_MLDump( playlist_t *p_playlist )
...
@@ -208,7 +208,7 @@ int playlist_MLDump( playlist_t *p_playlist )
if
(
!
config_GetInt
(
p_playlist
,
"media-library"
)
)
if
(
!
config_GetInt
(
p_playlist
,
"media-library"
)
)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
psz_datadir
=
config_GetUserD
ataDir
(
);
psz_datadir
=
config_GetUserD
ir
(
VLC_DATA_DIR
);
if
(
!
psz_datadir
)
/* XXX: This should never happen */
if
(
!
psz_datadir
)
/* XXX: This should never happen */
{
{
...
...
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