On 12/1/05, Alexandre Julliard julliard@winehq.org wrote:
James Hawkins truiken@gmail.com writes:
/* Generate a path with wildcard suitable for iterating */
if (CharPrevA(szFilename, szFilename + iLen) != "\\")
{
I don't think this means what you think it means ;-)
I thought about the comment when I was looking over it, thinking it might be misleading, and I decided that it applies to the block of code that is all of
+ /* Generate a path with wildcard suitable for iterating */ + if (CharPrevA(szFilename, szFilename + iLen) != "\") + { + lstrcatA(szFilename, "\"); + iLen++; + }
- /* TODO: Should check for system directory deletion etc. here */ + lstrcatA(szFilename, "*");
When the filename is a directory and the end of the string is not , append it, and we add * to the end no matter what so we can iterate through the files in the dir using Find*File. It's also possible to make the check as
if (szFilename[iLen] != '\')...
if the check is what's wrong. Am I missing something?
-- James Hawkins