From 8abce44708d052b140e0c0271fa09aa69e50a62f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 27 Dec 2018 20:33:30 +0100 Subject: [PATCH] restore permissions on directories to 1.1. i.e. rely on umask --- src/file.cpp | 5 ----- src/path.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index 5da1632c7..042670c35 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -114,11 +114,6 @@ struct iovec #endif #include #include -#ifndef TORRENT_MINGW -#include // for _getcwd, _mkdir -#else -#include -#endif #include #else // posix part diff --git a/src/path.cpp b/src/path.cpp index 0855055e2..19e15ff2e 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -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