summaryrefslogtreecommitdiff
path: root/project2/xmlCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/xmlCache.cpp')
-rw-r--r--project2/xmlCache.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/project2/xmlCache.cpp b/project2/xmlCache.cpp
index 0a166e8..22937d6 100644
--- a/project2/xmlCache.cpp
+++ b/project2/xmlCache.cpp
@@ -61,13 +61,20 @@ class XmlCache : public Cache {
boost::filesystem::path getCacheFile(const Glib::ustring & n, const Glib::ustring & f, const IHaveParameters * ps) const
{
boost::filesystem::path cache = Store / n.raw() / f.raw();
+ appendPath(cache, this);
+ if (inherit) {
+ appendPath(cache, ps);
+ }
+ cache /= FileName;
+ return cache;
+ }
+ static void appendPath(boost::filesystem::path & cache, const IHaveParameters * ps)
+ {
BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, ps->allParameters()) {
std::string v = p.second->value();
cache /= p.first.raw();
cache /= v;
}
- cache /= FileName;
- return cache;
}
XmlPresenterPtr writeTo;