Ensure compability check actually checks the type for files

Fixes https://github.com/rakshasa/rtorrent/issues/854
This commit is contained in:
kannibalox
2023-09-30 23:35:02 -04:00
committed by Jari Sundell
parent f2caa2651d
commit 6bf1731a1c
+1 -1
View File
@@ -63,7 +63,7 @@ template <> struct target_type_id<core::Download*, core::Download*> { static con
template <> inline bool
is_target_compatible<target_type>(const target_type& target) { return true; }
template <> inline bool
is_target_compatible<torrent::File*>(const target_type& target) { return target.first == command_base::target_file || command_base::target_file_itr; }
is_target_compatible<torrent::File*>(const target_type& target) { return (target.first == target_type_id<torrent::File*>::value || target.first == command_base::target_file_itr); }
template <> inline target_type
get_target_cast<target_type>(target_type target, int type) { return target; }