boost fs v2/v3 compat
This commit is contained in:
parent
87afcabccf
commit
0352a628c3
|
@ -162,7 +162,13 @@ Rosstackage::isStackage(const std::string& path)
|
||||||
void
|
void
|
||||||
Rosstackage::addStackage(const std::string& path)
|
Rosstackage::addStackage(const std::string& path)
|
||||||
{
|
{
|
||||||
|
#if !defined(BOOST_FILESYSTEM_VERSION) || (BOOST_FILESYSTEM_VERSION == 2)
|
||||||
std::string name = fs::path(path).filename();
|
std::string name = fs::path(path).filename();
|
||||||
|
#else
|
||||||
|
// in boostfs3, filename() returns a path, which needs to be stringified
|
||||||
|
std::string name = fs::path(path).filename().string();
|
||||||
|
#endif
|
||||||
|
|
||||||
if(stackages_.find(name) != stackages_.end())
|
if(stackages_.find(name) != stackages_.end())
|
||||||
{
|
{
|
||||||
// TODO: optionally notify on duplicates
|
// TODO: optionally notify on duplicates
|
||||||
|
|
Loading…
Reference in New Issue