mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06: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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user