restore permissions on directories to 1.1. i.e. rely on umask
This commit is contained in:
parent
97e86b2969
commit
8abce44708
|
@ -114,11 +114,6 @@ struct iovec
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
#ifndef TORRENT_MINGW
|
|
||||||
#include <direct.h> // for _getcwd, _mkdir
|
|
||||||
#else
|
|
||||||
#include <dirent.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#else
|
#else
|
||||||
// posix part
|
// posix part
|
||||||
|
|
|
@ -305,7 +305,7 @@ namespace {
|
||||||
&& GetLastError() != ERROR_ALREADY_EXISTS)
|
&& GetLastError() != ERROR_ALREADY_EXISTS)
|
||||||
ec.assign(GetLastError(), system_category());
|
ec.assign(GetLastError(), system_category());
|
||||||
#else
|
#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)
|
if (ret < 0 && errno != EEXIST)
|
||||||
ec.assign(errno, system_category());
|
ec.assign(errno, system_category());
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue