summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-05-07 16:59:12 +0000
committerrandomdan <randomdan@localhost>2011-05-07 16:59:12 +0000
commit5e12b75a79c5e3f1a18e16d58582f43ec5e8e0e7 (patch)
treec3106037dc5fcbf52e869bac9d1fd2272cb52294
parentAllow rawview to accurately reconstruct a tree when text and elements coexist... (diff)
downloadproject2-5e12b75a79c5e3f1a18e16d58582f43ec5e8e0e7.tar.bz2
project2-5e12b75a79c5e3f1a18e16d58582f43ec5e8e0e7.tar.xz
project2-5e12b75a79c5e3f1a18e16d58582f43ec5e8e0e7.zip
Minor tweaks to move to boost::filesystem3
-rw-r--r--project2/fsRows.cpp8
-rw-r--r--project2/fsRows.h2
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 <stdio.h>
#include <boost/date_time/posix_time/posix_time.hpp>
-typedef boost::filesystem::basic_directory_iterator<FsRows::Path> 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<Path> & 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<SpecBase> SpecBasePtr;
typedef std::set<SpecBasePtr> SpecBases;
typedef std::list<Glib::ustring> SpecSpec;
- typedef boost::filesystem::basic_path<std::string, boost::filesystem::path_traits> Path;
+ typedef boost::filesystem::path Path;
FsRows(const xmlpp::Element * p);
~FsRows();