Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
07b2e364
Commit
07b2e364
authored
Nov 10, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code factorization and some warning fixes
parent
497a6b5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
25 deletions
+6
-25
modules/access/directory.c
modules/access/directory.c
+6
-25
No files found.
modules/access/directory.c
View file @
07b2e364
...
...
@@ -74,9 +74,9 @@ static int DemuxOpen ( vlc_object_t * );
"collapse: subdirectories appear but are expanded on first play.\n" \
"expand: all subdirectories are expanded.\n" )
static
char
*
psz_recursive_list
[]
=
{
"none"
,
"collapse"
,
"expand"
};
static
char
*
psz_recursive_list_text
[]
=
{
N_
(
"none"
),
N_
(
"collapse"
),
N_
(
"expand"
)
};
static
c
onst
c
har
*
psz_recursive_list
[]
=
{
"none"
,
"collapse"
,
"expand"
};
static
c
onst
c
har
*
psz_recursive_list_text
[]
=
{
N_
(
"none"
),
N_
(
"collapse"
),
N_
(
"expand"
)
};
#define IGNORE_TEXT N_("Ignored extensions")
#define IGNORE_LONGTEXT N_( \
...
...
@@ -134,36 +134,17 @@ static int Open( vlc_object_t *p_this )
{
access_t
*
p_access
=
(
access_t
*
)
p_this
;
#ifdef HAVE_SYS_STAT_H
struct
stat
stat_info
;
char
*
psz_path
=
ToLocale
(
p_access
->
psz_path
);
if
(
(
stat
(
psz_path
,
&
stat_info
)
==
-
1
)
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
#elif defined(WIN32)
int
i_ret
;
# ifdef UNICODE
wchar_t
psz_path
[
MAX_PATH
];
mbstowcs
(
psz_path
,
p_access
->
psz_path
,
MAX_PATH
);
psz_path
[
MAX_PATH
-
1
]
=
0
;
# else
char
*
psz_path
=
p_access
->
psz_path
;
# endif
/* UNICODE */
i_ret
=
GetFileAttributes
(
psz_path
);
if
(
i_ret
==
-
1
||
!
(
i_ret
&
FILE_ATTRIBUTE_DIRECTORY
)
)
#ifdef HAVE_SYS_STAT_H
if
(
utf8_stat
(
p_access
->
psz_path
,
&
stat_info
)
||
!
S_ISDIR
(
stat_info
.
st_mode
))
#else
if
(
strcmp
(
p_access
->
psz_access
,
"dir"
)
&&
strcmp
(
p_access
->
psz_access
,
"directory"
)
)
#endif
{
LocaleFree
(
psz_path
);
return
VLC_EGENERIC
;
}
LocaleFree
(
psz_path
);
p_access
->
pf_read
=
Read
;
p_access
->
pf_block
=
NULL
;
p_access
->
pf_seek
=
NULL
;
...
...
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