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
be24a28f
Commit
be24a28f
authored
May 20, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't waste stat() right before opendir().
parent
31bf9857
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
modules/control/http/util.c
modules/control/http/util.c
+2
-11
No files found.
modules/control/http/util.c
View file @
be24a28f
...
...
@@ -111,9 +111,6 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
{
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
char
dir
[
MAX_DIR_SIZE
];
#ifdef HAVE_SYS_STAT_H
struct
stat
stat_info
;
#endif
DIR
*
p_dir
;
vlc_acl_t
*
p_acl
;
FILE
*
file
;
...
...
@@ -131,16 +128,10 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
sep
=
'/'
;
#endif
#ifdef HAVE_SYS_STAT_H
if
(
utf8_stat
(
psz_dir
,
&
stat_info
)
==
-
1
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
{
return
VLC_EGENERIC
;
}
#endif
if
(
(
p_dir
=
utf8_opendir
(
psz_dir
)
)
==
NULL
)
{
msg_Err
(
p_intf
,
"cannot open directory (%s)"
,
psz_dir
);
if
(
errno
!=
ENOENT
&&
errno
!=
ENOTDIR
)
msg_Err
(
p_intf
,
"cannot open directory (%s)"
,
psz_dir
);
return
VLC_EGENERIC
;
}
...
...
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