From 8e206c7d0d47e6320a1b3b422738fc7e40bc1d2f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 7 Oct 2008 09:24:30 +0000 Subject: [PATCH] attempt to fix bug in storage on windows where ENOENT was not properly caught --- src/storage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/storage.cpp b/src/storage.cpp index bc09243e6..d51eaeba3 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -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;