9fans archive / 2008 / 04 / 343 / prev next
From: "Juan Céspedes" <cespedes@lsu...>
Subject: Re: [9fans] ftpfs ahould not expose "." and ".." directories
Date: Mon, 28 Apr 2008 12:38:49 +0200
On Mon, Apr 28, 2008 at 12:19 PM, Pietro Gagliardi <pietro10@mac.com> wrote:
> You do realize using strncmp means that a filename like .abc or ..whatever
> will also get hidden?
False. He used strncmp(".", field[8], 2), which matches the first 2
bytes, i.e.,
'.' and '\0'.
But I agree with you: strcmp() would be better here.
Juan