mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 14:36:36 -05:00
handle EEXIST while cloning a path. closes #40
This commit is contained in:
parent
d1f3bd82e8
commit
6276ce9779
1 changed files with 8 additions and 1 deletions
|
|
@ -424,7 +424,14 @@ namespace fs
|
|||
topath = fs::make_path(tosrc,relative);
|
||||
rv = ::mkdir(topath.c_str(),st.st_mode);
|
||||
if(rv == -1)
|
||||
return -1;
|
||||
{
|
||||
if(errno != EEXIST)
|
||||
return -1;
|
||||
|
||||
rv = ::chmod(topath.c_str(),st.st_mode);
|
||||
if(rv == -1)
|
||||
return -1;
|
||||
}
|
||||
|
||||
rv = ::chown(topath.c_str(),st.st_uid,st.st_gid);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue