-/* LBS: An LFS-inspired filesystem backup system Copyright (C) 2007 Michael
- * Vrable
+/* LBS: An LFS-inspired filesystem backup system
+ * Copyright (C) 2007 Michael Vrable
*
* To speed backups, we maintain a "stat cache" containing selected information
* about all regular files, including modification times and the list of blocks
#include <map>
#include <string>
-#include "format.h"
#include "ref.h"
#include "statcache.h"
+#include "util.h"
using std::list;
using std::map;
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());