From 5e12b75a79c5e3f1a18e16d58582f43ec5e8e0e7 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sat, 7 May 2011 16:59:12 +0000 Subject: Minor tweaks to move to boost::filesystem3 --- project2/fsRows.cpp | 8 ++++---- project2/fsRows.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/project2/fsRows.cpp b/project2/fsRows.cpp index 3cfbf8c..e2ddc50 100644 --- a/project2/fsRows.cpp +++ b/project2/fsRows.cpp @@ -14,7 +14,7 @@ #include #include -typedef boost::filesystem::basic_directory_iterator DirEnt; +typedef boost::filesystem::directory_iterator DirEnt; DECLARE_LOADER("fsrows", FsRows); @@ -41,7 +41,7 @@ class FsRowSpecName : public FsRows::SpecBase { // Based on code written by Jack Handy - jakkhandy@hotmail.com // from http://www.codeproject.com/KB/string/wildcmp.aspx Glib::ustring::const_iterator wild = pattern.begin(); - Glib::ustring leaf(curPath(fs).leaf()); + Glib::ustring leaf(curPath(fs).leaf().string()); Glib::ustring::const_iterator string = leaf.begin(); while ((string != leaf.end()) && (*wild != '*')) { @@ -194,7 +194,7 @@ FsRows::execute(const Path & dir, const RowProcessor * rp) const } } } - catch (const boost::filesystem::basic_filesystem_error & e) { + catch (const boost::filesystem::filesystem_error & e) { Logger()->messagef(LOG_WARNING, "%s when processing '%s'", e.what(), dir.string().c_str()); } depth -= 1; @@ -269,7 +269,7 @@ FsRows::resolveAttr(const Glib::ustring & a) const VariableType FsRows::fileRelPath() const { - return curPathStr.substr(fsRoot.native_directory_string().length()); + return curPathStr.substr(fsRoot.string().length()); } VariableType diff --git a/project2/fsRows.h b/project2/fsRows.h index 9e59647..4e559cd 100644 --- a/project2/fsRows.h +++ b/project2/fsRows.h @@ -25,7 +25,7 @@ class FsRows : public RowSet { typedef boost::intrusive_ptr SpecBasePtr; typedef std::set SpecBases; typedef std::list SpecSpec; - typedef boost::filesystem::basic_path Path; + typedef boost::filesystem::path Path; FsRows(const xmlpp::Element * p); ~FsRows(); -- cgit v1.2.3