check metadata on chown/chmod errors when cloning

This commit is contained in:
Antonio SJ Musumeci
2017-02-15 09:08:27 -05:00
parent 899670bc93
commit 492d895632
4 changed files with 125 additions and 4 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ namespace fs
if(errno != EEXIST)
return -1;
rv = fs::chmod(topath,st.st_mode);
rv = fs::chmod_check_on_error(topath,st.st_mode);
if(rv == -1)
return -1;
}
@@ -96,7 +96,7 @@ namespace fs
if((rv == -1) && !ignorable_error(errno))
return -1;
rv = fs::chown(topath,st);
rv = fs::lchown_check_on_error(topath,st);
if(rv == -1)
return -1;