diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/context.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/context.cc b/src/context.cc index f96a45b..f71d2ac 100644 --- a/src/context.cc +++ b/src/context.cc @@ -32,7 +32,7 @@ #include "printutils.h" #include <boost/foreach.hpp> #include <boost/filesystem.hpp> -using namespace boost::filesystem; +namespace fs = boost::filesystem; #include "boosty.h" std::vector<const Context*> Context::ctx_stack; @@ -179,8 +179,8 @@ AbstractNode *Context::evaluate_module(const ModuleInstantiation &inst) const */ std::string Context::getAbsolutePath(const std::string &filename) const { - if (!filename.empty()) { - return boosty::absolute(path(this->document_path) / filename).string(); + if (!filename.empty() && !boosty::is_absolute(fs::path(filename))) { + return boosty::absolute(fs::path(this->document_path) / filename).string(); } else { return filename; |