Fixed > redir

This commit is contained in:
Khairul Kasmiran 2018-01-06 22:34:09 +08:00
parent b44f73154f
commit 068fe94fde

View File

@ -2041,12 +2041,13 @@ next:
// TODO honor `
if (ptr) {
// must honor "
char *oldptr = ptr;
char *ch;
ut32 cnt = 0;
for (ch = cmd; ch < ptr; ++ch) {
if (*ch == '"') ++cnt;
}
if (cnt == 0 || (cnt % 2)) ptr = NULL;
if (cnt == 0 || cnt % 2) ptr = oldptr;
}
if (ptr) {
int fdn = 1;