cumulus-util: In list-snapshot-sizes output, display backup intent values.
[cumulus.git] / metadata.cc
index f29c486..8de1a00 100644 (file)
@@ -24,6 +24,8 @@
  * handling of the statcache, and re-use of metadata between snapshots.
  */
 
+#include <stdlib.h>
+#include <string.h>
 #include <string>
 #include <iostream>
 #include <map>
@@ -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;