elevate privileges when calling clonepath. closes #41

This commit is contained in:
Antonio SJ Musumeci 2015-01-29 00:24:57 -05:00
parent 6276ce9779
commit c2cbb93c25
4 changed files with 17 additions and 4 deletions

View file

@ -73,7 +73,11 @@ _link(const fs::SearchFunc searchFunc,
fs::find::ffwp(srcmounts,todir,topaths);
if(topaths.size() > 0)
{
fs::clonepath(topaths[0].base,i->base,todir);
{
const mergerfs::ugid::SetResetGuard ugid(0,0);
fs::clonepath(topaths[0].base,i->base,todir);
}
lrv = ::link(pathfrom.c_str(),pathto.c_str());
}
}