set all permission bits on files and let umask handle reducing permissions

This commit is contained in:
Arvid Norberg 2008-07-18 14:15:18 +00:00
parent db4001e406
commit 64727894c4
1 changed files with 3 additions and 1 deletions

View File

@ -173,7 +173,9 @@ namespace libtorrent
std::string const& file_path = path.native_file_string();
#endif
#else // if not windows
const mode_t permissions = S_IRWXU | S_IRGRP | S_IROTH;
// rely on default umask to filter x and w permissions
// for group and others
const mode_t permissions = S_IRWXU | S_IRWXG | S_IRWXO;
std::string const& file_path = path.native_file_string();
#endif
m_fd = ::open(file_path.c_str(), map_open_mode(mode), permissions);