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
48b680eb
Commit
48b680eb
authored
Oct 02, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't stat the dir if we are gonna open it one call later.
Changed debug msg's to make sure they don't become annoying.
parent
0c53675c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
modules/access/directory.c
modules/access/directory.c
+2
-7
No files found.
modules/access/directory.c
View file @
48b680eb
...
@@ -152,10 +152,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -152,10 +152,6 @@ static int Open( vlc_object_t *p_this )
if
(
!
p_access
->
psz_path
)
if
(
!
p_access
->
psz_path
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
struct
stat
st
;
if
(
!
stat
(
p_access
->
psz_path
,
&
st
)
&&
!
S_ISDIR
(
st
.
st_mode
)
)
return
VLC_EGENERIC
;
DIR
*
handle
=
OpenDir
(
p_this
,
p_access
->
psz_path
);
DIR
*
handle
=
OpenDir
(
p_this
,
p_access
->
psz_path
);
if
(
handle
==
NULL
)
if
(
handle
==
NULL
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
@@ -573,18 +569,17 @@ static int ReadDir( access_t *p_access, playlist_t *p_playlist,
...
@@ -573,18 +569,17 @@ static int ReadDir( access_t *p_access, playlist_t *p_playlist,
static
DIR
*
OpenDir
(
vlc_object_t
*
obj
,
const
char
*
path
)
static
DIR
*
OpenDir
(
vlc_object_t
*
obj
,
const
char
*
path
)
{
{
msg_Dbg
(
obj
,
"opening directory `%s'"
,
path
);
DIR
*
handle
=
utf8_opendir
(
path
);
DIR
*
handle
=
utf8_opendir
(
path
);
if
(
handle
==
NULL
)
if
(
handle
==
NULL
)
{
{
int
err
=
errno
;
int
err
=
errno
;
if
(
err
!=
ENOTDIR
)
if
(
err
!=
ENOTDIR
)
msg_Err
(
obj
,
"%s: %m"
,
path
);
msg_Err
(
obj
,
"%s: %m"
,
path
);
else
// else not a dir
msg_Dbg
(
obj
,
"skipping non-directory `%s'"
,
path
);
errno
=
err
;
errno
=
err
;
return
NULL
;
return
NULL
;
}
}
msg_Dbg
(
obj
,
"opening directory `%s'"
,
path
);
return
handle
;
return
handle
;
}
}
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