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
2b757516
Commit
2b757516
authored
Nov 05, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
directory: stat() fallback if *at() functions are missing
parent
2ed45c18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
modules/access/directory.c
modules/access/directory.c
+8
-5
No files found.
modules/access/directory.c
View file @
2b757516
...
@@ -119,13 +119,19 @@ input_item_t *DirRead(access_t *access)
...
@@ -119,13 +119,19 @@ input_item_t *DirRead(access_t *access)
while
((
entry
=
vlc_readdir
(
sys
->
dir
))
!=
NULL
)
while
((
entry
=
vlc_readdir
(
sys
->
dir
))
!=
NULL
)
{
{
int
type
;
#ifdef HAVE_OPENAT
struct
stat
st
;
struct
stat
st
;
int
type
;
#ifdef HAVE_OPENAT
if
(
fstatat
(
dirfd
(
sys
->
dir
),
entry
,
&
st
,
0
))
if
(
fstatat
(
dirfd
(
sys
->
dir
),
entry
,
&
st
,
0
))
continue
;
continue
;
#else
char
path
[
PATH_MAX
];
if
(
snprintf
(
path
,
PATH_MAX
,
"%s"
DIR_SEP
"%s"
,
access
->
psz_filepath
,
entry
)
>=
PATH_MAX
||
vlc_stat
(
path
,
&
st
))
continue
;
#endif
switch
(
st
.
st_mode
&
S_IFMT
)
switch
(
st
.
st_mode
&
S_IFMT
)
{
{
case
S_IFBLK
:
case
S_IFBLK
:
...
@@ -154,9 +160,6 @@ input_item_t *DirRead(access_t *access)
...
@@ -154,9 +160,6 @@ input_item_t *DirRead(access_t *access)
default:
default:
continue
;
/* ignore */
continue
;
/* ignore */
}
}
#else
type
=
ITEM_TYPE_FILE
;
#endif
/* Create an input item for the current entry */
/* Create an input item for the current entry */
char
*
encoded
=
encode_URI_component
(
entry
);
char
*
encoded
=
encode_URI_component
(
entry
);
...
...
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