X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=metadata.cc;h=e1ea1aa18b87a04bd3db29ac251a4c58c9e5db85;hb=2911a4279cce1e880793c934ce90a187856c7c92;hp=f29c48600de0d5b089a86757ac71ab4f6998d478;hpb=0dfc70e01ddb7d2bce0db03d5364c0bd3a2bb308;p=cumulus.git diff --git a/metadata.cc b/metadata.cc index f29c486..e1ea1aa 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 @@ -116,7 +118,7 @@ MetadataWriter::MetadataWriter(TarSegmentStore *store, { statcache_path = path; statcache_path += "/statcache2"; - if (snapshot_scheme != NULL) + if (snapshot_scheme != NULL && strlen(snapshot_scheme) > 0) statcache_path = statcache_path + "-" + snapshot_scheme; statcache_tmp_path = statcache_path + "." + snapshot_name; @@ -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;