From P.Dalgaard at biostat.ku.dk  Fri Sep 18 18:11:51 2009
From: P.Dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Fri, 18 Sep 2009 18:11:51 +0200
Subject: [Rd] basename returns "." not in filename (PR#13958)
In-Reply-To: <20090918141511.30E4A282EF4E@mail.pubhealth.ku.dk>
References: <20090918141511.30E4A282EF4E@mail.pubhealth.ku.dk>
Message-ID: <4AB3B147.80601@biostat.ku.dk>

joehl at web.de wrote:
> Full_Name: Jens Oehlschl?gel
> Version: 2.9.2
> OS: Win32
> Submission from: (NULL) (85.181.152.156)
> 
> 
> # Obviously an empty basename is allowed (if the filepath is a pure path)
>> basename("/")
> [1] ""
> 
> # but here we get the dot from the path
>> basename("./")
> [1] "."

Command line utility does likewise:

viggo:~/>basename ./
.

Point is, I gather, that trailing slashes are removed, e.g.,

viggo:~/>basename foo/
foo

So, not a bug.

-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



[Rd] basename returns "." not in filename (PR#13958)
Peter Dalgaard