]> git.sesse.net Git - vlc/commitdiff
file: Be consistent with the rest of the world. Do not expand tilde.
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 4 Mar 2008 20:29:27 +0000 (22:29 +0200)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 4 Mar 2008 20:29:27 +0000 (22:29 +0200)
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>
modules/access/file.c

index b73ed3c9842e97e595806559981e6a7e56ff1515..a1c0384007cc1eff347f72e0db3f362d9d01606e 100644 (file)
@@ -380,16 +380,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
 static char *expand_path (const access_t *p_access, const char *path)
 {
-    if (strncmp (path, "~/", 2) == 0)
-    {
-        char *res;
-
-         // TODO: we should also support the ~cmassiot/ syntax
-         if (asprintf (&res, "%s/%s", p_access->p_libvlc->psz_homedir, path + 2) == -1)
-             return NULL;
-         return res;
-    }
-
 #if defined(WIN32)
     if (!strcasecmp (p_access->psz_access, "file")
       && ('/' == path[0]) && path[1] && (':' == path[2]) && ('/' == path[3]))