Subject: bug#16730: ls -dF double trailing slash bug

From: Pádraig Brady <[email-masked]>
Date: Wed, 12 Feb 2014 16:58:50 +0000

On 02/12/2014 04:52 PM, Eric Blake wrote:
> tag 16730 notabug
> thanks
> 
> On 02/12/2014 07:45 AM, Radko Dinev wrote:
>> user@host ~$ ls -dF somedir
>> somedir/
>>
>> user@host ~$ ls -dF somedir/
>> somedir//
>>
>> Notice the double trailing slash which shouldn't be there in the second
>> example.
> 
> Not a bug.  Consider:
> 
> $ touch '*'
> $ chmod +x '*'
> $ ls -F '*'
> **

> ls -F is merely appending the indicator on the end of the name as you
> typed it in, even if it results in what looks like a double indicator.
> 
> Where it gets interesting is on systems where / and // are distinct, but
> for consistency, we still do:
> 
> $ \ls -Fd / //
> //  ///

Related discussion at:
http://lists.gnu.org/archive/html/coreutils/2013-05/msg00024.html

thanks,
Pádraig.