<< Back Home EN en   Donate Donate

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

Sorry, only English version.

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:


См. также

FB or mail (remove X)   Share
Автор: Alter (Александр А. Телятников) Сервер: Apache+PHP под FBSD © 2002-2024