[PATCH 13/18] XCOPY: Add support for /EXCLUDELIST:file1+file2 etc

Ann & Jason Edmeades us at edmeades.me.uk
Fri Mar 30 14:23:49 CDT 2007


>> +                    if (wcsstr(copyFromUpper, pos->name) != NULL) {

>wcsstr() doesn't seem the right way to compare file names. You
>probably want to do a wcsicmp() of the end of the name or something
>like that.

It's not a file compare, it's a substring compare, eg if the file contains
just the letter s, all files with s(/S) in either the directory, name or
extension will not get copied. Because there is not a stristr / strstri type
function, I uppercase the lines as read from the exclude file when I save
them away, and then uppercase the source names when doing the search. Hence
I can use strstr (wcsstr) to do the substring matching.

So I think the patch was right...

Until I started thinking harder about it... 

There is another unrelated bug, in that the matching should only occur in
the new parts of the tree, not in the original stem. My patch would fail all
files if you put eg, a ':' in there as I am strstr'ing against an expanded
path.

I'll fix that bit and resubmit. If there's anything wrong with the wcsstr
logic though, please let me know.

Thanks for the commits
Jason





More information about the wine-devel mailing list