X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=statcache.cc;h=099eb708ae3c7a9688cf438fee75e4e4c689376e;hb=893aa36d4dee18cc85843c441219c8e177282e79;hp=5a8d26c608024321b93ecd917a21a243ab3f187c;hpb=28fd36f0df5411edc5c0177c5034a4dab66e7b1d;p=cumulus.git diff --git a/statcache.cc b/statcache.cc index 5a8d26c..099eb70 100644 --- a/statcache.cc +++ b/statcache.cc @@ -30,9 +30,9 @@ #include #include -#include "format.h" #include "ref.h" #include "statcache.h" +#include "util.h" using std::list; using std::map; @@ -79,10 +79,13 @@ static int pathcmp(const char *path1, const char *path2) return pathcmp(slash1 + 1, slash2 + 1); } -void StatCache::Open(const char *path, const char *snapshot_name) +void StatCache::Open(const char *path, const char *snapshot_name, + const char *snapshot_scheme) { oldpath = path; oldpath += "/statcache"; + if (snapshot_scheme != NULL) + oldpath = oldpath + "-" + snapshot_scheme; newpath = oldpath + "." + snapshot_name; oldcache = new ifstream(oldpath.c_str());