Changeset e4e839be778874b313c716ef5cccde562fe5a07a

Show
Ignore:
Timestamp:
30/09/05 19:18:45 (3 years ago)
Author:
Benjamin Pracht <bigben@videolan.org>
git-committer:
Benjamin Pracht <bigben@videolan.org> 1128100725 +0000
git-parent:

[76807978007211db96f6cacc0be2b6e97724457a]

git-author:
Benjamin Pracht <bigben@videolan.org> 1128100725 +0000
Message:

* Cleaner url parsing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/gnomevfs.c

    rb709105 re4e839b  
    161161        psz_escaped_path = gnome_vfs_escape_path_string( url.psz_path ); 
    162162 
    163         if( psz_escaped_path && strcmp( psz_escaped_path,"/" ) 
    164                                         && strcmp( psz_escaped_path,"//" ) ) 
     163        if( psz_escaped_path ) 
    165164        { 
    166165    /* Now let's reconstruct a valid URI from all that stuff */ 
    167             psz_path_begin = strstr( psz_unescaped, url.psz_path ); 
    168             if( psz_path_begin ) *psz_path_begin = '\0'; 
     166            psz_path_begin = psz_unescaped + strlen( psz_unescaped ) 
     167                                           - strlen( url.psz_path ); 
     168            *psz_path_begin = '\0'; 
    169169            psz_uri = malloc( strlen( psz_unescaped ) + 
    170170                                        strlen( psz_escaped_path ) + 1 );