-
-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]))
- // Explorer can open path such as file:/C:/ or file:///C:/
- // hence remove leading / if found
- return strdup (path + 1);
-#endif
-
- return strdup (path);
-}
-
-