mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 16:38:43 +00:00
Fix libtorrent creating files with no read/write permissions
This commit is contained in:
parent
02ce32d5e2
commit
2745bf8536
1 changed files with 6 additions and 3 deletions
|
@ -165,15 +165,18 @@ namespace libtorrent
|
||||||
std::wstring wpath(safe_convert(path.native_file_string()));
|
std::wstring wpath(safe_convert(path.native_file_string()));
|
||||||
m_fd = ::_wopen(
|
m_fd = ::_wopen(
|
||||||
wpath.c_str()
|
wpath.c_str()
|
||||||
, map_open_mode(mode));
|
, map_open_mode(mode)
|
||||||
|
, S_IREAD | S_IWRITE);
|
||||||
#elif defined _WIN32
|
#elif defined _WIN32
|
||||||
m_fd = ::_open(
|
m_fd = ::_open(
|
||||||
utf8_native(path.native_file_string()).c_str()
|
utf8_native(path.native_file_string()).c_str()
|
||||||
, map_open_mode(mode));
|
, map_open_mode(mode)
|
||||||
|
, S_IREAD | S_IWRITE);
|
||||||
#else
|
#else
|
||||||
m_fd = ::open(
|
m_fd = ::open(
|
||||||
utf8_native(path.native_file_string()).c_str()
|
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
|
#endif
|
||||||
if (m_fd == -1)
|
if (m_fd == -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue