Treat //foo as an argument instead of as a command

Fixes bug #23858.
This commit is contained in:
Sadrul Habib Chowdhury
2008-07-30 00:42:01 -04:00
parent 9672f21e65
commit dc178907d0

View File

@@ -1057,7 +1057,12 @@ char **namep;
}
else
#endif
if ((stat(arg, &st)) == 0 && S_ISCHR(st.st_mode))
if (strncmp(arg, "//", 2) == 0)
{
Msg(0, "Invalid argument '%s'", arg);
return -1;
}
else if ((stat(arg, &st)) == 0 && S_ISCHR(st.st_mode))
{
if (access(arg, R_OK | W_OK) == -1)
{