diff options
Diffstat (limited to 'server/src/templatelist.cc')
-rw-r--r-- | server/src/templatelist.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/templatelist.cc b/server/src/templatelist.cc index b952467..0fc8ec5 100644 --- a/server/src/templatelist.cc +++ b/server/src/templatelist.cc @@ -44,7 +44,8 @@ void TemplateList::addFile(std::string file) try { parser.parse(); Template *templ = parser.getTemplate(); - (*this)[templ->attributes["name"]][VersionStr(templ->attributes["version"])] = file; + std::pair<VersionStr, std::string> p(VersionStr(templ->attributes["version"]), file); + (*this)[templ->attributes["name"]].insert(p); } catch(Exception &e) { PRACRO_WARN(templatelist, "Skipping %s: %s\n", file.c_str(), e.what()); } |