Commit eeff52c8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Revert "Win32: fix #2592 (stdin file input). It may impact other platforms, so...

Revert "Win32: fix #2592 (stdin file input). It may impact other platforms, so please test, and fix/revert if you see a bug."

This reverts commit e33a82db.
This broke opening any file starting with a dash.
parent 36558eb5
...@@ -1100,18 +1100,7 @@ char *make_URI (const char *path) ...@@ -1100,18 +1100,7 @@ char *make_URI (const char *path)
} }
else else
if (path[0] != DIR_SEP_CHAR) if (path[0] != DIR_SEP_CHAR)
{ { /* Relative path: prepend the current working directory */
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]; char cwd[PATH_MAX];
if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */ if (getcwd (cwd, sizeof (cwd)) == NULL) /* FIXME: UTF8? */
...@@ -1122,7 +1111,6 @@ char *make_URI (const char *path) ...@@ -1122,7 +1111,6 @@ char *make_URI (const char *path)
free (buf); free (buf);
return ret; return ret;
} }
}
else else
buf = strdup ("file://"); buf = strdup ("file://");
if (buf == NULL) if (buf == NULL)
......
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