fixup! fix: return error when renaming into existing file (#5563)
This commit is contained in:
parent
4343926441
commit
b86afe185b
|
@ -2466,11 +2466,11 @@ bool renameArgsAreValid(tr_torrent const* tor, std::string_view oldpath, std::st
|
|||
}
|
||||
|
||||
auto const newpath_as_dir = tr_pathbuf{ newpath, '/' };
|
||||
auto const n_files = tor->file_count();
|
||||
auto const n_files = tor->fileCount();
|
||||
|
||||
for (tr_file_index_t i = 0; i < n_files; ++i)
|
||||
{
|
||||
auto const& name = tor->file_subpath(i);
|
||||
auto const& name = tor->fileSubpath(i);
|
||||
if (newpath == name || tr_strvStartsWith(name, newpath_as_dir))
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue