summaryrefslogtreecommitdiff
path: root/server/src/templatelist.cc
diff options
context:
space:
mode:
authordeva <deva>2010-01-15 10:43:59 +0000
committerdeva <deva>2010-01-15 10:43:59 +0000
commite1d4c1224c0e1abce1d8cae49e241b37f1ca3eed (patch)
tree1e6c5fc292b58f640d20bdcd7106158dea5d9a3c /server/src/templatelist.cc
parentc9e19f0f303db3d15f2dcb1185417a4200a29573 (diff)
Add fix to entitylist, for mixing updates on dir rename/moves. Updated MacroList and TemplateList to macth new interface and use new insert method.
Diffstat (limited to 'server/src/templatelist.cc')
-rw-r--r--server/src/templatelist.cc9
1 files changed, 5 insertions, 4 deletions
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<VersionStr, std::string> 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());
}