On 5/8/07, Liu Yubao <yubao.liu@xxxxxxxxx> wrote:
+#ifdef __CYGWIN__ + /* + * On cygwin, lstat("hello", &st) returns 0 when + * "hello.exe" exists, so test with open() again. + */ + if (lstat(match, &st) && -1 != (fd = open(match, O_RDONLY))) {
This does not "test again" if lstat returns 0. If lstat returns 0 (file stat info obtained) the open is not even called. Besides, cygwin lies not only about .exe but also about .lnk files. P.S. Somehow I have the feeling that even if it is a stupidity in cygwin they will not fix it (nor will they admit it is a bug). - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html