Commit b0966945 authored by Rafaël Carré's avatar Rafaël Carré

Removes useless sanity checks

parent 914f2018
...@@ -508,7 +508,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -508,7 +508,7 @@ 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) static char *expand_path (const access_t *p_access, const char *path)
{ {
if ( ( strlen (path) >= 2 ) && ( strncmp (path, "~/", 2) == 0 )) if (strncmp (path, "~/", 2) == 0)
{ {
char *res; char *res;
...@@ -519,8 +519,7 @@ static char *expand_path (const access_t *p_access, const char *path) ...@@ -519,8 +519,7 @@ static char *expand_path (const access_t *p_access, const char *path)
} }
#if defined(WIN32) #if defined(WIN32)
if ( ( strlen(p_access->psz_access ) >= 4 ) if (!strcasecmp (p_access->psz_access, "file")
&& !strcasecmp (p_access->psz_access, "file")
&& ('/' == path[0]) && path[1] && (':' == path[2]) && ('/' == path[3])) && ('/' == path[0]) && path[1] && (':' == path[2]) && ('/' == path[3]))
// Explorer can open path such as file:/C:/ or file:///C:/ // Explorer can open path such as file:/C:/ or file:///C:/
// hence remove leading / if found // hence remove leading / if found
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment