attempt to fix bug in storage on windows where ENOENT was not properly caught

This commit is contained in:
Arvid Norberg 2008-10-07 09:24:30 +00:00
parent 3fbdded9f3
commit 8e206c7d0d
1 changed files with 4 additions and 0 deletions

View File

@ -2222,7 +2222,11 @@ namespace libtorrent
if (num_read < 0)
{
if (m_storage->error()
#ifdef TORRENT_WINDOWS
&& m_storage->error() != error_code(ERROR_FILE_NOT_FOUND, get_system_category()))
#else
&& m_storage->error() != error_code(ENOENT, get_posix_category()))
#endif
{
std::cerr << m_storage->error().message() << std::endl;
return -1;