Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't prefix filenames which are already absolute with document path.…

… Fixed #123
  • Loading branch information...
commit 9698d1d2fbe6b19573a0e483a6411a8ebd0f6947 1 parent 38cb06c
@kintel kintel authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/context.cc
View
6 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;
Please sign in to comment.
Something went wrong with that request. Please try again.