advpack: Handle dwFlags for DelNode with tests

James Hawkins truiken at gmail.com
Thu Dec 1 08:45:37 CST 2005


On 12/1/05, Alexandre Julliard <julliard at winehq.org> wrote:
> James Hawkins <truiken at 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



More information about the wine-devel mailing list