From: Dmitry Potapov Date: Sat, 11 Oct 2008 16:33:10 GMT Subject: Re: [PATCH v2] correct verify_path for Windows Message-ID: <20081011163310.GZ21650@dpotapov.dyndns.org> In-Reply-To: <48EAFF23.1020607@viscovery.net> On Tue, Oct 07, 2008 at 08:18:11AM +0200, Johannes Sixt wrote: > Dmitry Potapov schrieb: > > +#if defined(_WIN32) || defined(__CYGWIN__) > > I think that for consistency you should use __MINGW32__ instead of _WIN32. I like Alex's suggestion more to use FILESYSTEM_CASEINSENSITIVE. > > > + /* On Windows, file names are case-insensitive */ > > + case 'G': > > + if ((rest[1]|0x20) != 'i') > > + break; > > + if ((rest[2]|0x20) != 't') > > + break; > > We have tolower(). I am aware of that, but I am not sure what we gain by using it. It seems it makes only code bigger and slow. As to readability, I don't see much improvement... Isn't obvious what this code does, especially with the above comment? Dmitry