Boost logo

Boost :

Subject: Re: [boost] boost::filesystem::path frustration
From: Peter Dimov (lists_at_[hidden])
Date: 2013-01-25 12:37:49


Neil Groves wrote:

> For illustration:
> I suspect that the result you want from fn("/usr/sbin/../bin/test1.txt",
> "/usr/bin/test2.txt") is "/usr/bin" rather than "/usr".

Not necessarily. If /usr/sbin is a symbolic link to, say, /opt/sbin, the
'real' common prefix is not /usr/bin. Depending on the use case, /usr may
well be more correct, it being the logical common ancestor (but not the
physical common ancestor).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk