http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #2 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-08-10 05:22:41 CDT --- After further examination, current code redirects twice output to bar file: 1. when initially parsing "if 1==1 echo foo>bar" => there's a scan through the whole command for redirects, regardless of tokens (WCMD_execute)
and
2. when executing the subcommand "echo foo>bar" (WCMD_part_execute)