At the moment, when running quickbook from a different directory to the
source file, it doesn't adjust the path correctly for an imported code
file. I've attached a patch to fix this, I copied and pasted the code
from the include action, so it could be factored out.
Is it okay to commit?
Daniel
Index: detail/actions.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions.cpp,v
retrieving revision 1.44
diff -u -r1.44 actions.cpp
--- detail/actions.cpp 21 Dec 2006 04:54:55 -0000 1.44
+++ detail/actions.cpp 6 Jan 2007 15:31:58 -0000
@@ -859,6 +859,14 @@
void import_action::operator()(iterator first, iterator last) const
{
fs::path path(std::string(first, last), fs::native);
+
+ // check to see if the path is complete and if not, make it relative to the current path
+ if (!path.is_complete())
+ {
+ path = actions.filename.branch_path() / path;
+ path.normalize();
+ }
+
std::string ext = fs::extension(path);
std::vector<template_symbol> storage;
load_snippets(path.string(), storage, ext);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests:
https://lists.sourceforge.net/lists/listinfo/boost-docs