diff --git a/gazebo/common/Console.cc b/gazebo/common/Console.cc index 6b86bc2d02..bb4dbe3180 100644 --- a/gazebo/common/Console.cc +++ b/gazebo/common/Console.cc @@ -221,7 +221,7 @@ void FileLogger::Init(const std::string &_prefix, const std::string &_filename) if (boost::filesystem::is_directory(logPath)) this->logDirectory = logPath.string(); else - this->logDirectory = logPath.branch_path().string(); + this->logDirectory = logPath.parent_path().string(); } ///////////////////////////////////////////////// diff --git a/gazebo/util/LogPlay.cc b/gazebo/util/LogPlay.cc index 70cfcc3346..be00820edb 100644 --- a/gazebo/util/LogPlay.cc +++ b/gazebo/util/LogPlay.cc @@ -414,8 +414,8 @@ common::Time LogPlay::LogEndTime() const ///////////////////////////////////////////////// std::string LogPlay::Filename() const { - return boost::filesystem::basename(this->dataPtr->filename) + - boost::filesystem::extension(this->dataPtr->filename); + boost::filesystem::path path(this->dataPtr->filename); + return path.stem().string() + path.extension().string(); } /////////////////////////////////////////////////