Have mkdir in ensure_dir respect umask.

This also aligns with the mkdir bif. Fixes #1145
This commit is contained in:
Vlad Grigorescu 2020-08-26 10:01:20 -05:00
parent 427a7de411
commit e12db6bac0

View file

@ -317,7 +317,7 @@ bool ensure_intermediate_dirs(const char* dirname)
bool ensure_dir(const char *dirname)
{
if ( mkdir(dirname, 0700) == 0 )
if ( mkdir(dirname, 0777) == 0 )
return true;
auto mkdir_errno = errno;