I forwarded the bug report to bo...@lists.boost.org [1] and
this is the response: "as designed".  See below and let me know
if that answer is sufficient to close the bug.

Thanks,
-Steve

[1] http://lists.boost.org/Archives/boost/2010/01/160891.php

----- Forwarded message from Beman Dawes <bda...@acm.org> -----

Date: Sun, 17 Jan 2010 19:17:06 -0500
From: Beman Dawes <bda...@acm.org>
To: boost <bo...@lists.boost.org>
Subject: Re: [boost] Boost.Filesystem: basename function is not compatible
        with POSIX; potential for path-related security issues

On Sat, Jan 16, 2010 at 8:45 PM, Steve M. Robbins <st...@sumost.ca> wrote:

> Hi,
>
> I got the following report [1] for Boost.Filesystem from a Debian
> user.  Before entering into trac, I thought I'd ask whether this
> deviation from POSIX is by design or is a bug.
>
>
> Thanks,
> -Steve
> P.S. The original report is based on Boost 1.40, but I
> verified the same behaviour on Boost 1.41.
>
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565504
>
> ----- Forwarded message from Roger Leigh <rle...@debian.org> -----
>
> Package: libboost-filesystem1.40.0
> Version: 1.40.0-5
> Severity: important
>
> The basename function is not compatible with the POSIX function by the
> same name...
>

Right. That's part of the reason why boost::filesystem::basename() is
deprecated.

Use path::filename() if you want the POSIX functionality. Use path::stem()
if you want the old boost::filesystem::basename() functionality. Use
path::extension() if you want the extension.

--Beman
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


----- End forwarded message -----

Attachment: signature.asc
Description: Digital signature

Reply via email to