stop auto calculating and storing fullpath in policies

This commit is contained in:
Antonio SJ Musumeci
2015-07-01 07:47:40 -04:00
parent 0c60701b29
commit b2cd79154a
37 changed files with 278 additions and 259 deletions

View File

@ -50,7 +50,7 @@ _truncate(Policy::Func::Action actionFunc,
{
int rv;
int error;
Paths paths;
vector<string> paths;
rv = actionFunc(srcmounts,fusepath,minfreespace,paths);
if(rv == -1)
@ -59,7 +59,9 @@ _truncate(Policy::Func::Action actionFunc,
error = 0;
for(size_t i = 0, ei = paths.size(); i != ei; i++)
{
rv = ::truncate(paths[i].full.c_str(),size);
fs::path::append(paths[i],fusepath);
rv = ::truncate(paths[i].c_str(),size);
if(rv == -1)
error = errno;
}