Do not set permissions twice with "-p"

This commit is contained in:
Pierre Pronchery 2018-01-28 17:52:39 +01:00
parent fd59be9156
commit fb2e7034fa

View File

@ -438,8 +438,6 @@ static int _single_recurse(Copy * copy, char const * src, char const * dst,
copy2.prefs = &prefs2;
if(mkdir(dst, mode) != 0 && errno != EEXIST)
return _copy_filename_error(copy, dst, 1);
if(*(copy->prefs) & PREFS_p && chmod(dst, mode) != 0)
_copy_filename_error(copy, dst, 0);
srclen = strlen(src);
dstlen = strlen(dst);
if((dir = browser_vfs_opendir(src, NULL)) == NULL)
@ -477,8 +475,6 @@ static int _single_fifo(Copy * copy, char const * dst, mode_t mode)
{
if(mkfifo(dst, mode) != 0)
return _copy_filename_error(copy, dst, 1);
if(*(copy->prefs) & PREFS_p && chmod(dst, mode) != 0)
return _copy_filename_error(copy, dst, 0);
return 0;
}