revert mistake
This commit is contained in:
parent
04eae38bcd
commit
6ea6bf9e92
|
@ -20,7 +20,6 @@
|
|||
* fix uTP edge case where udp socket buffer fills up
|
||||
* fix nagle implementation in uTP
|
||||
|
||||
* fixed error handling of missing directories in download path
|
||||
* try unencrypted connections first, and fall back to encryption if it fails (performance improvement)
|
||||
* add missing functions to python binding (flush_cache(), remap_files() and orig_files())
|
||||
* improve handling of filenames that are invalid on windows
|
||||
|
|
|
@ -514,8 +514,7 @@ namespace libtorrent
|
|||
// if old_name doesn't exist, that's not an error
|
||||
// here. Once we start writing to the file, it will
|
||||
// be written to the new filename
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory
|
||||
&& ec != boost::system::errc::not_a_directory)
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory)
|
||||
{
|
||||
set_error(old_name, ec);
|
||||
return true;
|
||||
|
@ -541,8 +540,7 @@ namespace libtorrent
|
|||
error_code ec;
|
||||
remove(p, ec);
|
||||
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory
|
||||
&& ec != boost::system::errc::not_a_directory)
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory)
|
||||
set_error(p, ec);
|
||||
}
|
||||
|
||||
|
@ -758,8 +756,7 @@ namespace libtorrent
|
|||
error_code ec;
|
||||
file_status s;
|
||||
stat_file(save_path, &s, ec);
|
||||
if (ec == boost::system::errc::no_such_file_or_directory
|
||||
|| ec == boost::system::errc::not_a_directory)
|
||||
if (ec == boost::system::errc::no_such_file_or_directory)
|
||||
create_directories(save_path, ec);
|
||||
else if (ec)
|
||||
return false;
|
||||
|
@ -784,8 +781,7 @@ namespace libtorrent
|
|||
std::string new_path = combine_path(save_path, *i);
|
||||
|
||||
rename(old_path, new_path, ec);
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory
|
||||
&& ec != boost::system::errc::not_a_directory)
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory)
|
||||
{
|
||||
error_code ec;
|
||||
recursive_copy(old_path, new_path, ec);
|
||||
|
@ -1159,9 +1155,7 @@ ret:
|
|||
|
||||
error_code ec;
|
||||
file_handle = open_file(file_iter, op.mode, ec);
|
||||
if (((op.mode & file::rw_mask) == file::read_write)
|
||||
&& (ec == boost::system::errc::no_such_file_or_directory
|
||||
|| ec == boost::system::errc::not_a_directory))
|
||||
if (((op.mode & file::rw_mask) == file::read_write) && ec == boost::system::errc::no_such_file_or_directory)
|
||||
{
|
||||
// this means the directory the file is in doesn't exist.
|
||||
// so create it
|
||||
|
@ -1292,9 +1286,7 @@ ret:
|
|||
TORRENT_ASSERT((aligned_size & size_align) == 0);
|
||||
|
||||
size_type actual_file_size = file_handle->get_size(ec);
|
||||
if (ec && ec != boost::system::errc::no_such_file_or_directory
|
||||
&& ec != boost::system::errc::not_a_directory)
|
||||
return -1;
|
||||
if (ec && ec != make_error_code(boost::system::errc::no_such_file_or_directory)) return -1;
|
||||
ec.clear();
|
||||
|
||||
// allocate a temporary, aligned, buffer
|
||||
|
|
Loading…
Reference in New Issue