https://bugs.winehq.org/show_bug.cgi?id=7961
Lauri Kenttä lauri.kentta@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lauri.kentta@gmail.com
--- Comment #18 from Lauri Kenttä lauri.kentta@gmail.com --- Created attachment 56304 --> https://bugs.winehq.org/attachment.cgi?id=56304 Tests for FindFirstFile
I hacked the FindFirstFile + FindNextFile from Wine into a stand-alone program (attached) to see where the bug lies. This test shows that the Wine functions work exactly the same on Wine and Windows, which means that the problem is in the implementation of FindFirstFile (or FindNextFile) and not in any of the other places.
My test output on Windows:
RtlGetFullPathName_U: '*.' -> 'Z:\7961*' RtlDosPathNameToNtPathName_U: '*.' -> '??\Z:\7961*' RtlGetFullPathName_U: '*. ' -> 'Z:\7961*' RtlDosPathNameToNtPathName_U: '*. ' -> '??\Z:\7961*'
'*', wine copy: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext', '*', real deal: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext',
'*.*', wine copy: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext', '*.*', real deal: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext',
'.*', wine copy: '.', '..', '.dot-start', '.*', real deal: '.', '..', '.dot-start',
'*.', wine copy: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext', '*.', real deal: '.', '..', 'dot-end', 'no-ext',
'*. ', wine copy: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext', '*. ', real deal: '.', '..', 'dot-end', '.dot-start', 'no-ext', 'full.ext',
On Wine, as you can guess, the "real deal" lines are identical to the "wine copy" lines, so the only difference is with '*.', as this bug report states.
What's interesting is that adding a space after the dot makes Windows strip the dot as well.
Apparently there should be some magic in FindFirstFile to detect and handle paths ending with a dot.