Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
04aae4db
Commit
04aae4db
authored
May 20, 2008
by
Rémi Denis-Courmont
Browse files
No need to do stat() before opendir()!
parent
cca9e206
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/misc/lua/net.c
View file @
04aae4db
...
...
@@ -283,13 +283,7 @@ int vlclua_opendir( lua_State *L )
const
char
*
psz_dir
=
luaL_checkstring
(
L
,
1
);
DIR
*
p_dir
;
int
i
=
0
;
#ifdef HAVE_SYS_STAT_H
struct
stat
s
;
if
(
utf8_stat
(
psz_dir
,
&
s
)
==
-
1
)
return
luaL_error
(
L
,
"Error while trying to stat `%s'."
,
psz_dir
);
if
(
!
S_ISDIR
(
s
.
st_mode
)
)
return
luaL_error
(
L
,
"`%s' is not a directory."
,
psz_dir
);
#endif
if
(
(
p_dir
=
utf8_opendir
(
psz_dir
)
)
==
NULL
)
return
luaL_error
(
L
,
"cannot open directory `%s'."
,
psz_dir
);
...
...
Write
Preview
Supports
Markdown
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