rework policy code

This commit is contained in:
Antonio SJ Musumeci 2014-05-27 21:21:45 -04:00
parent 345d0bbdc4
commit aab90b0503
35 changed files with 983 additions and 991 deletions

View file

@ -43,15 +43,15 @@ _symlink(const vector<string> &srcmounts,
const string to)
{
int rv;
fs::Path path;
fs::PathVector paths;
path = fs::find_first(srcmounts,fs::dirname(to));
if(path.base.empty())
fs::find::ff(srcmounts,fs::dirname(to),paths);
if(paths.empty())
return -ENOENT;
path.full = fs::make_path(path.base,to);
paths[0].full = fs::make_path(paths[0].base,to);
rv = symlink(from.c_str(),path.full.c_str());
rv = symlink(from.c_str(),paths[0].full.c_str());
return ((rv == -1) ? -errno : 0);
}