restore permissions on directories to 1.1. i.e. rely on umask

This commit is contained in:
Arvid Norberg 2018-12-27 20:33:30 +01:00 committed by Arvid Norberg
parent 97e86b2969
commit 8abce44708
2 changed files with 1 additions and 6 deletions

View File

@ -114,11 +114,6 @@ struct iovec
#endif
#include <windows.h>
#include <winioctl.h>
#ifndef TORRENT_MINGW
#include <direct.h> // for _getcwd, _mkdir
#else
#include <dirent.h>
#endif
#include <sys/types.h>
#else
// posix part

View File

@ -305,7 +305,7 @@ namespace {
&& GetLastError() != ERROR_ALREADY_EXISTS)
ec.assign(GetLastError(), system_category());
#else
int ret = ::mkdir(n.c_str(), S_IRWXU | S_IRGRP | S_IROTH);
int ret = ::mkdir(n.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
if (ret < 0 && errno != EEXIST)
ec.assign(errno, system_category());
#endif