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
579d4ae7
Commit
579d4ae7
authored
May 06, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tilde expansion is the shell's job. Don't do it *too* (= twice).
parent
3b457e16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
31 deletions
+2
-31
src/config/file.c
src/config/file.c
+2
-31
No files found.
src/config/file.c
View file @
579d4ae7
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
#include "modules/modules.h"
#include "modules/modules.h"
static
char
*
ConfigKeyToString
(
int
);
static
char
*
ConfigKeyToString
(
int
);
static
char
*
config_GetCustomConfigFile
(
libvlc_int_t
*
);
static
inline
char
*
strdupnull
(
const
char
*
src
)
static
inline
char
*
strdupnull
(
const
char
*
src
)
{
{
...
@@ -66,16 +65,13 @@ static char *config_GetConfigFile( void )
...
@@ -66,16 +65,13 @@ static char *config_GetConfigFile( void )
static
FILE
*
config_OpenConfigFile
(
vlc_object_t
*
p_obj
,
const
char
*
mode
)
static
FILE
*
config_OpenConfigFile
(
vlc_object_t
*
p_obj
,
const
char
*
mode
)
{
{
char
*
psz_filename
;
char
*
psz_filename
=
config_GetPsz
(
p_obj
,
"config"
);
FILE
*
p_stream
;
psz_filename
=
config_GetCustomConfigFile
(
p_obj
->
p_libvlc
);
if
(
!
psz_filename
)
if
(
!
psz_filename
)
psz_filename
=
config_GetConfigFile
();
psz_filename
=
config_GetConfigFile
();
msg_Dbg
(
p_obj
,
"opening config file (%s)"
,
psz_filename
);
msg_Dbg
(
p_obj
,
"opening config file (%s)"
,
psz_filename
);
p_stream
=
utf8_fopen
(
psz_filename
,
mode
);
FILE
*
p_stream
=
utf8_fopen
(
psz_filename
,
mode
);
if
(
p_stream
==
NULL
&&
errno
!=
ENOENT
)
if
(
p_stream
==
NULL
&&
errno
!=
ENOENT
)
{
{
msg_Err
(
p_obj
,
"cannot open config file (%s): %m"
,
msg_Err
(
p_obj
,
"cannot open config file (%s): %m"
,
...
@@ -695,31 +691,6 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
...
@@ -695,31 +691,6 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
return
SaveConfigFile
(
p_this
,
psz_module_name
,
false
);
return
SaveConfigFile
(
p_this
,
psz_module_name
,
false
);
}
}
/**
* Get the user's configuration file when given with the --config option
*/
static
char
*
config_GetCustomConfigFile
(
libvlc_int_t
*
p_libvlc
)
{
char
*
psz_configfile
=
config_GetPsz
(
p_libvlc
,
"config"
);
if
(
psz_configfile
!=
NULL
)
{
if
(
psz_configfile
[
0
]
==
'~'
&&
psz_configfile
[
1
]
==
'/'
)
{
/* This is incomplete: we should also support the ~cmassiot/ syntax */
char
*
psz_buf
;
if
(
asprintf
(
&
psz_buf
,
"%s/%s"
,
config_GetHomeDir
(),
psz_configfile
+
2
)
==
-
1
)
{
free
(
psz_configfile
);
return
NULL
;
}
free
(
psz_configfile
);
psz_configfile
=
psz_buf
;
}
}
return
psz_configfile
;
}
int
ConfigStringToKey
(
const
char
*
psz_key
)
int
ConfigStringToKey
(
const
char
*
psz_key
)
{
{
int
i_key
=
0
;
int
i_key
=
0
;
...
...
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