cmd: Fix 'if exist' with a directory/ as a parameter.
commit5e2f9996baedbe389df93255a4dd1188cbdb6c56
authorMaarten De Braekeleer <maarten.debraekeleer@gmail.com>
Sat, 24 Jun 2023 18:02:53 +0000 (24 20:02 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 26 Jun 2023 14:44:17 +0000 (26 16:44 +0200)
tree0443d8c8f7be6142ad46f36b6a2d6b45f96f1b65
parentdcf0bf1f383f8429136cb761f5170a04503a297b
cmd: Fix 'if exist' with a directory/ as a parameter.

'if exists' takes a parameter which can be directory, directory/,
directory/. directory\ or directory\. for example, and should equate
to true if the directory exists. The syntax directory\ is explicitly
rejected by FindFirstFile and hence was not working - look for this
specific case, and if found append a '.'.

Follow-up commit of bc9d68bcbee5c9d4f4582f766a4f552870385361

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55130#add_comment
programs/cmd/builtins.c
programs/cmd/tests/test_builtins.cmd
programs/cmd/tests/test_builtins.cmd.exp