This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: cygport-0.9.0 in release-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Yaakov (Cygwin Ports) wrote:
> I rebuilt and tested the X11R7 lndir on 1.7, and unfortunately it seems
> to have the same bug. I would prefer to fix lndir and just use it
> exclusively then trying to deal with the workaround. Could you take a
> look at the source (only one .c file) and see if you can help me figure
> it out?
>
> http://ftp.sunsite.dk/projects/cygwinports/release/X11/lndir/lndir-1.0.1-1-src.tar.bz2
Based on the description of your problem, what about the attached patch?
Your test case then works, but:
1) I have no idea what other side effects this may have;
2) Why does Cygwin act differently then every other *NIX here?
3) How many other packages is this behaviour going to affect?
Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAkiy11EACgkQpiWmPGlmQSMjTACg36bx0b+epZXfFlb3F0GSCvgg
tz0AoJq8EeT9r4YjWkTTfLrO4255RPSe
=O57a
-----END PGP SIGNATURE-----
--- origsrc/lndir-1.0.1/lndir.c 2005-11-23 16:33:07.000000000 -0600
+++ src/lndir-1.0.1/lndir.c 2008-08-25 10:55:14.270794700 -0500
@@ -205,8 +205,10 @@
if ((sb.st_mode & S_IFMT) == S_IFDIR)
#endif
{
+#ifndef __CYGWIN__
/* directory */
n_dirs--;
+#endif
if (dp->d_name[0] == '.' &&
(dp->d_name[1] == '\0' || (dp->d_name[1] == '.' &&
dp->d_name[2] == '\0')))