summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-01 15:09:39 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-01 15:09:39 -0600
commite493a3859c7c854b79e772ffb1c0a69f6868ac98 (patch)
tree8d4a356347b5bd1f6959ca0959756890ad53269e /src
parent9ec9cdf41e5176f7fcf06da5f75593d9ba3d4028 (diff)
downloadfork-ledger-e493a3859c7c854b79e772ffb1c0a69f6868ac98.tar.gz
fork-ledger-e493a3859c7c854b79e772ffb1c0a69f6868ac98.tar.bz2
fork-ledger-e493a3859c7c854b79e772ffb1c0a69f6868ac98.zip
Use filesystem::complete not absolute with Boost < 1.46
Diffstat (limited to 'src')
-rw-r--r--src/context.h4
-rw-r--r--src/pyinterp.cc4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/context.h b/src/context.h
index 0533536f..d7999e5a 100644
--- a/src/context.h
+++ b/src/context.h
@@ -110,7 +110,11 @@ inline parse_context_t open_for_reading(const path& pathname,
throw_(std::runtime_error,
_("Cannot read journal file %1") << filename);
+#if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3
path parent(filesystem::absolute(pathname, cwd).parent_path());
+#else
+ path parent(filesystem::complete(pathname, cwd).parent_path());
+#endif
shared_ptr<std::istream> stream(new ifstream(filename));
parse_context_t context(stream, parent);
context.pathname = filename;
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index 4dbb7134..adcd0167 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -206,7 +206,11 @@ object python_interpreter_t::import_option(const string& str)
if (contains(str, ".py")) {
#if BOOST_VERSION >= 103700
path& cwd(parsing_context.get_current().current_directory);
+#if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3
path parent(filesystem::absolute(file, cwd).parent_path());
+#else
+ path parent(filesystem::complete(file, cwd).parent_path());
+#endif
DEBUG("python.interp", "Adding " << parent << " to PYTHONPATH");
paths.insert(0, parent.string());
sys_dict["path"] = paths;