Changeset c2f5a92b2b73bdc23c5d588af49c0f5a8b754b7c

Show
Ignore:
Timestamp:
03/04/08 21:29:27 (6 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1204662567 +0200
git-parent:

[73e7165fcb6dd96e646b72dbea3e8b5d5f896d5c]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1204662567 +0200
Message:

file: Be consistent with the rest of the world. Do not expand tilde.

The shell already does it, and \~ should not be expanded by VLC.
Also fixes consistency with the other file-opening plugins
(directory, mmap, cdda...).

Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>

Files:

Legend:

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

    r1c0f708 rc2f5a92  
    381381static char *expand_path (const access_t *p_access, const char *path) 
    382382{ 
    383     if (strncmp (path, "~/", 2) == 0) 
    384     { 
    385         char *res; 
    386  
    387          // TODO: we should also support the ~cmassiot/ syntax 
    388          if (asprintf (&res, "%s/%s", p_access->p_libvlc->psz_homedir, path + 2) == -1) 
    389              return NULL; 
    390          return res; 
    391     } 
    392  
    393383#if defined(WIN32) 
    394384    if (!strcasecmp (p_access->psz_access, "file")