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
f9d4021d
Commit
f9d4021d
authored
Oct 16, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix the directory 'ignore' mode which skips .jpg's, nfo's etc when opening directories.
parent
d6fb7fa7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
modules/access/directory.c
modules/access/directory.c
+27
-14
No files found.
modules/access/directory.c
View file @
f9d4021d
...
@@ -395,26 +395,38 @@ static int ReadDir( playlist_t *p_playlist,
...
@@ -395,26 +395,38 @@ static int ReadDir( playlist_t *p_playlist,
playlist_item_t
*
p_node
;
playlist_item_t
*
p_node
;
/* Build array with ignores */
/* Build array with ignores */
#ifdef HAVE_STRSEP
char
**
ppsz_extensions
=
0
;
char
**
ppsz_extensions
=
0
;
int
i_extensions
=
0
;
int
i_extensions
=
0
;
char
*
psz_ignore
=
var_CreateGetString
(
p_playlist
,
"ignore-filetypes"
);
char
*
psz_ignore
=
var_CreateGetString
(
p_playlist
,
"ignore-filetypes"
);
if
(
psz_ignore
&&
*
psz_ignore
)
if
(
psz_ignore
&&
*
psz_ignore
)
{
{
char
*
psz_backup
;
char
*
psz_parser
=
psz_ignore
;
char
*
psz_parser
=
psz_backup
=
strdup
(
psz_ignore
);
int
a
;
int
a
=
0
;
while
(
strsep
(
&
psz_parser
,
","
)
)
i_extensions
++
;
for
(
a
=
0
;
psz_parser
[
a
]
!=
'\0'
;
a
++
)
free
(
psz_backup
);
{
if
(
psz_parser
[
a
]
==
','
)
i_extensions
++
;
}
ppsz_extensions
=
(
char
**
)
malloc
(
sizeof
(
char
*
)
*
i_extensions
);
ppsz_extensions
=
(
char
**
)
malloc
(
sizeof
(
char
*
)
*
i_extensions
);
psz_parser
=
psz_ignore
;
for
(
a
=
0
;
a
<
i_extensions
;
a
++
)
while
(
a
<
i_extensions
&&
{
(
ppsz_extensions
[
a
++
]
=
strsep
(
&
psz_parser
,
","
)
)
);
int
b
;
char
*
tmp
;
while
(
psz_parser
[
0
]
!=
'\0'
&&
psz_parser
[
0
]
==
' '
)
psz_parser
++
;
for
(
b
=
0
;
psz_parser
[
b
]
!=
'\0'
;
b
++
)
{
if
(
psz_parser
[
b
]
==
','
)
break
;
}
tmp
=
malloc
(
b
+
1
);
strncpy
(
tmp
,
psz_parser
,
b
);
tmp
[
b
]
=
0
;
ppsz_extensions
[
a
]
=
tmp
;
psz_parser
+=
b
+
1
;
}
}
}
#endif
/* HAVE_STRSEP */
/* Change the item to a node */
/* Change the item to a node */
if
(
p_parent
->
i_children
==
-
1
)
if
(
p_parent
->
i_children
==
-
1
)
...
@@ -498,7 +510,6 @@ static int ReadDir( playlist_t *p_playlist,
...
@@ -498,7 +510,6 @@ static int ReadDir( playlist_t *p_playlist,
playlist_item_t
*
p_item
;
playlist_item_t
*
p_item
;
char
*
psz_tmp1
,
*
psz_tmp2
,
*
psz_loc
;
char
*
psz_tmp1
,
*
psz_tmp2
,
*
psz_loc
;
#ifdef HAVE_STRSEP
if
(
i_extensions
>
0
)
if
(
i_extensions
>
0
)
{
{
char
*
psz_dot
=
strrchr
(
p_dir_content
->
d_name
,
'.'
);
char
*
psz_dot
=
strrchr
(
p_dir_content
->
d_name
,
'.'
);
...
@@ -518,7 +529,6 @@ static int ReadDir( playlist_t *p_playlist,
...
@@ -518,7 +529,6 @@ static int ReadDir( playlist_t *p_playlist,
}
}
}
}
}
}
#endif
/* HAVE_STRSEP */
psz_loc
=
FromLocale
(
psz_uri
);
psz_loc
=
FromLocale
(
psz_uri
);
psz_tmp1
=
vlc_fix_readdir_charset
(
VLC_OBJECT
(
p_playlist
),
psz_tmp1
=
vlc_fix_readdir_charset
(
VLC_OBJECT
(
p_playlist
),
...
@@ -543,10 +553,13 @@ static int ReadDir( playlist_t *p_playlist,
...
@@ -543,10 +553,13 @@ static int ReadDir( playlist_t *p_playlist,
free
(
psz_uri
);
free
(
psz_uri
);
}
}
#ifdef HAVE_STRSEP
for
(
i
=
0
;
i
<
i_extensions
;
i
++
)
{
if
(
ppsz_extensions
[
i
]
)
free
(
ppsz_extensions
[
i
]
);
}
if
(
ppsz_extensions
)
free
(
ppsz_extensions
);
if
(
ppsz_extensions
)
free
(
ppsz_extensions
);
if
(
psz_ignore
)
free
(
psz_ignore
);
if
(
psz_ignore
)
free
(
psz_ignore
);
#endif
/* HAVE_STRSEP */
free
(
pp_dir_content
);
free
(
pp_dir_content
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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