add category to policies so as to distinguish between creates and searches

This commit is contained in:
Antonio SJ Musumeci 2015-06-25 17:55:16 -04:00
parent a5bf48c8ae
commit 51b6d3f647
32 changed files with 292 additions and 224 deletions

View file

@ -40,10 +40,11 @@ using std::size_t;
namespace mergerfs
{
int
Policy::Func::lfs(const vector<string> &basepaths,
const string &fusepath,
const size_t minfreespace,
Paths &paths)
Policy::Func::lfs(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath,
const size_t minfreespace,
Paths &paths)
{
fsblkcnt_t lfs;
const char *lfsstr;
@ -73,7 +74,7 @@ namespace mergerfs
}
if(lfsstr == NULL)
return Policy::Func::mfs(basepaths,fusepath,minfreespace,paths);
return mfs(type,basepaths,fusepath,minfreespace,paths);
paths.push_back(Path(lfsstr,
fs::make_path(lfsstr,fusepath)));