updated file_win and file_pool error handling

This commit is contained in:
Arvid Norberg
2008-02-25 04:41:21 +00:00
parent 480b63b516
commit 9f44c577d7
6 changed files with 134 additions and 93 deletions

View File

@@ -158,7 +158,7 @@ namespace libtorrent
close();
}
void open(fs::path const& path, int mode)
bool open(fs::path const& path, int mode)
{
TORRENT_ASSERT(path.is_complete());
close();
@@ -189,8 +189,10 @@ namespace libtorrent
<< std::strerror(errno);
if (!m_error) m_error.reset(new std::string);
*m_error = msg.str();
return false;
}
m_open_mode = mode;
return true;
}
void close()
@@ -330,9 +332,9 @@ namespace libtorrent
file::~file() {}
void file::open(fs::path const& p, file::open_mode m)
bool file::open(fs::path const& p, file::open_mode m)
{
m_impl->open(p, m.m_mask);
return m_impl->open(p, m.m_mask);
}
void file::close()