Mail Archives: cygwin-developers/2003/01/09/06:58:44
On Wed, Jan 08, 2003 at 11:15:16PM -0500, Pierre A. Humblet wrote:
> A consequence of this hard nosed approach is that ls -l may not show
> all files. To avoid that, stat could return uid = gid = -1 and modes = 0.
>
> Which is best in this case: conformance to posix or user friendliness?
IMHO user friendliness. I've checked in a patch. When calling ls -l
on such a file or dir, the output looks like this now:
---------- 1 65535 65535 48452 Jan 7 12:17 foo
d--------- 2 65535 65535 0 Jan 9 12:09 foodir
However, coincidentally I found another problem while testing that change.
When a directory is unreadable for an account, the link count of that
directory is set to 0 by the call to num_entries().
That should be 2, shouldn't it?
There's the comment in fhandler_disk_file::fstat_helper() which is
fairly old AFAIR:
/* Unfortunately the count of 2 confuses `find (1)' command. So
let's try it with `1' as link count. */
But this is only valid for remote dirs so it should be safe to return 2
from num_entries.
Chris?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
- Raw text -