[cmd] Don't change case of the batch filename
paul.vriens.wine at gmail.com
Thu Feb 18 08:02:41 CST 2010
On 02/18/2010 02:51 PM, Alexandre Julliard wrote:
> Paul Vriens<paul.vriens.wine at gmail.com> writes:
>> diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
>> index 28744d4..6cb732c 100644
>> --- a/programs/cmd/batch.c
>> +++ b/programs/cmd/batch.c
>> @@ -91,7 +91,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
>> prev_context = context;
>> context = LocalAlloc (LMEM_FIXED, sizeof (BATCH_CONTEXT));
>> context -> h = h;
>> - context->batchfileW = WCMD_strdupW(string);
>> + context->batchfileW = WCMD_strdupW(file);
> That whole function is broken, it should not be lowering the string in
> the first place. It does this in order to use strstrW, but that's not
> the right way to check the extension anyway.
I'm not even sure the extension checking is needed as the extension
already seems to be present when calling WCMD_batch.
> In any case the test environment needs to be comparing paths in a
> case-insensitive way, it doesn't make sense to require exact case.
So the memcmp needs to change into some strcmp form?
More information about the wine-devel