diff --git a/ChangeLog b/ChangeLog index fb0f615e5..b67061d75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -85,6 +85,8 @@ release 0.14.7 * fixed division by zero in get_peer_info() * fixed bug where pieces may have been requested before the metadata was received + * fixed incorrect error when deleting files from a torrent where + not all files have been created release 0.14.6 diff --git a/src/storage.cpp b/src/storage.cpp index 6d24aff16..ab3ee34fb 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -752,7 +752,9 @@ namespace libtorrent #if BOOST_VERSION >= 103500 catch (boost::system::system_error& e) { - set_error(p, e.code()); + // no such file or directory is not an error + if (e.code() != make_error_code(boost::system::errc::no_such_file_or_directory)) + set_error(p, e.code()); } #else catch (boost::filesystem::filesystem_error& e) @@ -762,6 +764,7 @@ namespace libtorrent #endif // BOOST_VERSION #endif // BOOST_NO_EXCEPTIONS #else + // no such file or directory is not an error if (std::remove(convert_to_native(p).c_str()) != 0 && errno != ENOENT) { set_error(p, error_code(errno, get_posix_category()));