return clonepath errors

currently the error is ignored and it was expected the primary call would
fail. problem is it returns confusing errors as a result. (eg ENOENT vs EPERM)
This commit is contained in:
Antonio SJ Musumeci 2016-12-06 16:48:52 -05:00
parent 05d81dbc23
commit 35075bb0cd
6 changed files with 53 additions and 34 deletions

View file

@ -49,7 +49,9 @@ _symlink_loop_core(const string &existingpath,
if(newbasepath != existingpath)
{
const ugid::SetRootGuard ugidGuard;
fs::clonepath(existingpath,newbasepath,newdirpath);
rv = fs::clonepath(existingpath,newbasepath,newdirpath);
if(rv == -1)
return -1;
}
fs::path::make(&newbasepath,newpath,fullnewpath);