Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
452
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
cfc1bc92
Commit
cfc1bc92
authored
2 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
lua: fix usage of NULL config_GetUserDir/config_GetSysPath results
parent
9960c105
No related branches found
Branches containing commit
No related tags found
1 merge request
!2468
fix usage of NULL config_GetUserDir/config_GetSysPath results
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/lua/vlc.c
+5
-3
5 additions, 3 deletions
modules/lua/vlc.c
with
5 additions
and
3 deletions
modules/lua/vlc.c
+
5
−
3
View file @
cfc1bc92
...
...
@@ -199,15 +199,17 @@ 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_USERDATA_DIR
),
luadirname
);
char
*
userdir
=
config_GetUserDir
(
VLC_USERDATA_DIR
);
if
(
likely
(
userdir
!=
NULL
))
list
=
vlclua_dir_list_append
(
list
,
userdir
,
luadirname
);
char
*
libdir
=
config_GetSysPath
(
VLC_PKG_LIBEXEC_DIR
,
NULL
);
char
*
datadir
=
config_GetSysPath
(
VLC_PKG_DATA_DIR
,
NULL
);
bool
both
=
libdir
!=
NULL
&&
datadir
!=
NULL
&&
strcmp
(
libdir
,
datadir
);
/* Tokenized Lua scripts in architecture-specific data directory */
list
=
vlclua_dir_list_append
(
list
,
libdir
,
luadirname
);
if
(
libdir
!=
NULL
)
list
=
vlclua_dir_list_append
(
list
,
libdir
,
luadirname
);
/* Source Lua Scripts in architecture-independent data directory */
if
(
both
||
libdir
==
NULL
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment