[Bug 37195] cmd does not accept wild cards
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun Jul 26 16:36:47 CDT 2015
https://bugs.winehq.org/show_bug.cgi?id=37195
--- Comment #2 from Jason Edmeades <us at edmeades.me.uk> ---
All releases... no need for logs, as the sample batch pgm shows the issue.
The issue is simply in programs/cmd/builtins.c, WCMD_if, these lines:
else if (!lstrcmpiW (condition, existW)) {
test = (GetFileAttributesW(WCMD_parameter(p, 1+negate, NULL, FALSE,
FALSE))
!= INVALID_FILE_ATTRIBUTES);
WCMD_parameter(p, 2+negate, &command, FALSE, FALSE);
}
so we take the parameter to the 'if' and type to find out about it. We probably
should do something like (not even compiled!!)
else if (!lstrcmpiW (condition, existW)) {
WIN32_FIND_DATAW fd;
HANDLE hff;
hff = FindFirstFileW(WCMD_parameter(p, 1+negate, NULL, FALSE, FALSE), &fd);
test = (hff != INVALID_HANDLE_VALUE)
FindClose(hff);
WCMD_parameter(p, 2+negate, &command, FALSE, FALSE);
}
Feel free to add a test, try this and submit - I dont have Linux to play with
at the moment but the problem looks 'obvious'.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list