[Bug 46823] New: in wcmd.exe, trailing slash in "if exist SomeDir/" cause always false

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 11 17:22:13 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=46823

            Bug ID: 46823
           Summary: in wcmd.exe, trailing slash in "if exist SomeDir/"
                    cause always false
           Product: Wine
           Version: 4.3
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: cmd
          Assignee: wine-bugs at winehq.org
          Reporter: alter at ukr.net
      Distribution: ---

Created attachment 63849
  --> https://bugs.winehq.org/attachment.cgi?id=63849
fix issue with instant false due to trailing slash in 'if exist SomeDir/'

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

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



More information about the wine-bugs mailing list