[niepce] * src/engine/db/filebundle.cpp: path::stem() is not



commit 277cef01f7e68f12bfbd13800d246b4ccefbf86e
Author: Hubert Figuiere <hub figuiere net>
Date:   Tue Apr 21 21:48:14 2009 -0400

    	* src/engine/db/filebundle.cpp: path::stem() is not
    	available on older version of boost.
---
 ChangeLog                    |    3 +++
 src/engine/db/filebundle.cpp |    9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f906e74..7b78828 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-04-21  Hubert Figuiere  <hub figuiere net>
 
+	* src/engine/db/filebundle.cpp: path::stem() is not
+	available on older version of boost.
+
 	* Initialize gettext properly.
 
 	* src/fwk/toolkit/mimetype.cpp: Fix a build breakage.
diff --git a/src/engine/db/filebundle.cpp b/src/engine/db/filebundle.cpp
index a37407d..a22dfa8 100644
--- a/src/engine/db/filebundle.cpp
+++ b/src/engine/db/filebundle.cpp
@@ -18,6 +18,8 @@
  */
 
 
+#include <boost/version.hpp>
+#include <boost/filesystem/convenience.hpp>
 
 #include "filebundle.hpp"
 #include "fwk/utils/debug.h"
@@ -69,7 +71,12 @@ FileBundle::filter_bundles(const utils::FileList::Ptr & files)
     for(utils::FileList::const_iterator iter = files->begin();
         iter != files->end(); ++iter)
     {
-        std::string basename = iter->stem();
+        std::string basename;
+#if BOOST_VERSION >= 103600
+        basename = iter->stem();
+#else
+        basename = boost::filesystem::basename(*iter);
+#endif
         if(basename != current_base) {
             current_base = basename;
             current_bundle = FileBundle::Ptr(new FileBundle());



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]