mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Don't display warning when folder named stayed the same.
Copy some code from AddNewTorrent dialog and beautify a bit. Closes #4970.
This commit is contained in:
parent
7794502324
commit
2bb76bf781
2 changed files with 27 additions and 22 deletions
|
@ -501,6 +501,10 @@ void AddNewTorrentDialog::renameSelectedFile()
|
|||
path_items.removeLast();
|
||||
path_items << new_name_last;
|
||||
QString new_path = path_items.join("/");
|
||||
if (Utils::Fs::sameFileNames(old_path, new_path)) {
|
||||
qDebug("Name did not change");
|
||||
return;
|
||||
}
|
||||
if (!new_path.endsWith("/")) new_path += "/";
|
||||
// Check for overwriting
|
||||
for (int i = 0; i < m_torrentInfo.filesCount(); ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue