[vlc-devel] commit: Treat directory items like file ones for URI->name generation ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Jul 12 15:50:44 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 12 16:48:51 2009 +0300| [55aabaaa129aefd652e0ba3ea4648234ef559c79] | committer: Rémi Denis-Courmont
Treat directory items like file ones for URI->name generation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55aabaaa129aefd652e0ba3ea4648234ef559c79
---
src/input/item.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/input/item.c b/src/input/item.c
index b37a8b7..ac6006d 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -363,7 +363,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
p_i->i_type = GuessType( p_i );
- if( !p_i->psz_name && p_i->i_type == ITEM_TYPE_FILE )
+ if( p_i->psz_name )
+ ;
+ else
+ if( p_i->i_type == ITEM_TYPE_FILE || p_i->i_type == ITEM_TYPE_DIRECTORY )
{
const char *psz_filename = strrchr( p_i->psz_uri, '/' );
@@ -376,12 +379,11 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
if( p_i->psz_name )
decode_URI( p_i->psz_name );
}
-
- /* The name is NULL: fill it with everything except login and password */
- if( !p_i->psz_name )
- {
+ else
+ { /* Strip login and password from title */
int r;
vlc_url_t url;
+
vlc_UrlParse( &url, psz_uri, 0 );
if( url.psz_protocol )
{
More information about the vlc-devel
mailing list