refix permissions that last rev reverted

This commit is contained in:
Marcos Pinto 2008-07-17 00:54:06 +00:00
parent 85939e93ba
commit 952b8dcea3
1 changed files with 6 additions and 3 deletions

View File

@ -165,15 +165,18 @@ namespace libtorrent
std::wstring wpath(safe_convert(path.native_file_string()));
m_fd = ::_wopen(
wpath.c_str()
, map_open_mode(mode));
, map_open_mode(mode)
, S_IREAD | S_IWRITE);
#elif defined _WIN32
m_fd = ::_open(
utf8_native(path.native_file_string()).c_str()
, map_open_mode(mode));
, map_open_mode(mode)
, S_IREAD | S_IWRITE);
#else
m_fd = ::open(
utf8_native(path.native_file_string()).c_str()
, map_open_mode(mode));
, map_open_mode(mode)
, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#endif
if (m_fd == -1)
{