X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=metadata.cc;h=2ae075190cf49afaed661fd53f66498843bb6a97;hp=d9463869af4bdfed799bcc654ebfac970d9af95b;hb=f38dd9bcb0caffd3fc9126b05788c936690e8288;hpb=910255ec7fb85ef6c7b9515e9761892ca408c389 diff --git a/metadata.cc b/metadata.cc index d946386..2ae0751 100644 --- a/metadata.cc +++ b/metadata.cc @@ -24,6 +24,8 @@ * handling of the statcache, and re-use of metadata between snapshots. */ +#include +#include #include #include #include @@ -96,7 +98,7 @@ static string encode_dict(const map& dict) string result; if (dict.find("name") != dict.end()) { - result += "name: " + dict.at("name") + "\n"; + result += "name: " + dict.find("name")->second + "\n"; } for (map::const_iterator i = dict.begin(); @@ -126,7 +128,7 @@ MetadataWriter::MetadataWriter(TarSegmentStore *store, if (statcache_out == NULL) { fprintf(stderr, "Error opening statcache %s: %m\n", statcache_tmp_path.c_str()); - throw IOException("Error opening statcache"); + fatal("Error opening statcache"); } old_metadata_eof = false;