[Bug 37195] New: windows cmd does not accept wild cards when used in Wine
https://bugs.winehq.org/show_bug.cgi?id=37195 Bug ID: 37195 Summary: windows cmd does not accept wild cards when used in Wine Product: Wine-gecko Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-gecko-unknown Assignee: jacek(a)codeweavers.com Reporter: jj.wauters(a)hotmail.com Created attachment 49444 --> https://bugs.winehq.org/attachment.cgi?id=49444 batch example Running a batch file where wild cards are used does not succeed as wild cards are not recognized. Example with attached batch: when running in Windows it shows the files when running in Wine it does not shows the files -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|wine-gecko-unknown |-unknown Assignee|jacek(a)codeweavers.com |wine-bugs(a)winehq.org Product|Wine-gecko |Wine -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 Jason Edmeades <us(a)edmeades.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |us(a)edmeades.me.uk Component|-unknown |cmd -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase --- Comment #1 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- What version of Wine? Requires console logs. http://wiki.winehq.org/Bugs -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|windows cmd does not accept |cmd does not accept wild |wild cards when used in |cards |Wine | -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 --- Comment #2 from Jason Edmeades <us(a)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.
https://bugs.winehq.org/show_bug.cgi?id=37195 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crramirez(a)gmail.com, | |winetest(a)luukku.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 --- Comment #3 from winetest(a)luukku.com --- You just need to add ; test = (hff != INVALID_HANDLE_VALUE) <-- here. And it compiles. Still valid wine 1.9.24. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com, | |austinenglish(a)gmail.com --- Comment #4 from winetest(a)luukku.com --- I just retested this, because I understood that I need to replace the code and not add it there. When done this correctly the patch indeed fixes the issue. Now this bug needs test(s)? And submiter? The keyword lacks patch word. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 Jason Edmeades <us(a)edmeades.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Jason Edmeades <us(a)edmeades.me.uk> --- I'd forgotten about this... In effect its dup of bug#45052 which I have just submitted a patch for - ie the IF exists did not support wilcards previously (normally I'd resolve the newer bug dup of the older, but the other is the one I've submitted the patch against). Interestingly the final patch was pretty much identical to the code I'd pasted in here, and I coded it a second time without looking :-) *** This bug has been marked as a duplicate of bug 45052 *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37195 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED CC| |nerv(a)dawncrow.de --- Comment #6 from André H. <nerv(a)dawncrow.de> --- closing dup -- 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.
participants (1)
-
wine-bugs@winehq.org