X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftext%2Fstrings.c;h=09c4ed1e4c3de5213104001abe94f3223fbf773d;hb=eeff52c80e2c3321b8de8e358ba41af65309d2be;hp=b69c9e54f1805a84cbe18187f1722fbae9d368fd;hpb=36558eb52ea617c0c6293dc0974bc41df3fca1ba;p=vlc diff --git a/src/text/strings.c b/src/text/strings.c index b69c9e54f1..09c4ed1e4c 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -1100,28 +1100,16 @@ char *make_URI (const char *path) } else if (path[0] != DIR_SEP_CHAR) - { - if(path[0] == '-') - { - /*reading from stdin*/ - if (asprintf (&buf, "-") == -1) - return NULL; - - return buf; - } - else - { - /* Relative path: prepend the current working directory */ - char cwd[PATH_MAX]; + { /* Relative path: prepend the current working directory */ + char cwd[PATH_MAX]; - if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */ - return NULL; - if (asprintf (&buf, "%s/%s", cwd, path) == -1) - return NULL; - char *ret = make_URI (buf); - free (buf); - return ret; - } + if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */ + return NULL; + if (asprintf (&buf, "%s/%s", cwd, path) == -1) + return NULL; + char *ret = make_URI (buf); + free (buf); + return ret; } else buf = strdup ("file://");