Alter.Org.UA
 << Back Home UK uk   Donate Donate

in wcmd.exe under Wine trailing slash in "if exist SomeDir/" cause always false

if exist SomeDir/ do-smth.cmd

statement (with ending slash) always return false since 'if exist' CMD implementation start using FindFirstFileW() instead of GetFileAttributesW() in builtins.c Such condition appears in MS VisualStudio generated makefiles. There is special case for trailing '\\', but there is no handling for '/'. The patch proposed fixes this issue and adds corresponding tests for

if exist SomeDir/ do-smth.cmd
if exist "SomeDir/" do-smth.cmd
cases

Patch download:
wine_cmd_if_exist_slash.patch.gz

2019.03.12

See also:


FB or mail alterX@alter.org.ua (remove X)   Share
designed by Alter aka Alexander A. Telyatnikov powered by Apache+PHP under FBSD © 2002-2024