From e1d4c1224c0e1abce1d8cae49e241b37f1ca3eed Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 15 Jan 2010 10:43:59 +0000 Subject: Add fix to entitylist, for mixing updates on dir rename/moves. Updated MacroList and TemplateList to macth new interface and use new insert method. --- server/src/templatelist.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/src/templatelist.cc') diff --git a/server/src/templatelist.cc b/server/src/templatelist.cc index 0fc8ec5..b8e8462 100644 --- a/server/src/templatelist.cc +++ b/server/src/templatelist.cc @@ -32,9 +32,9 @@ #include "debug.h" TemplateList::TemplateList(std::string path) - : EntityList("template") + : EntityList(path, "template") { - rescan(path); + rescan(); } void TemplateList::addFile(std::string file) @@ -44,8 +44,9 @@ void TemplateList::addFile(std::string file) try { parser.parse(); Template *templ = parser.getTemplate(); - std::pair p(VersionStr(templ->attributes["version"]), file); - (*this)[templ->attributes["name"]].insert(p); + insertEntity(templ->attributes["name"], + templ->attributes["version"], + file); } catch(Exception &e) { PRACRO_WARN(templatelist, "Skipping %s: %s\n", file.c_str(), e.what()); } -- cgit v1.2.3