Dont treat filenames starting with - as stdin

This commit is contained in:
Panu Matilainen 2009-07-14 11:15:30 +03:00
parent 666e26bd7a
commit 0114bb51dd
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,6 @@ static struct urlstring {
{ "hkp://", URL_IS_HKP }, { "hkp://", URL_IS_HKP },
{ "http://", URL_IS_HTTP }, { "http://", URL_IS_HTTP },
{ "https://", URL_IS_HTTPS }, { "https://", URL_IS_HTTPS },
{ "-", URL_IS_DASH },
{ NULL, URL_IS_UNKNOWN } { NULL, URL_IS_UNKNOWN }
}; };
@ -86,6 +85,8 @@ urltype urlIsURL(const char * url)
continue; continue;
return us->ret; return us->ret;
} }
if (strcmp(url, "-") == 0)
return URL_IS_DASH;
} }
return URL_IS_UNKNOWN; return URL_IS_UNKNOWN;