<< 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

Patch download:


See also:

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