mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Fix browse button in torrent addition dialog.
Was broken by a recent pull request.
This commit is contained in:
parent
810a9710d7
commit
f05ecf900a
1 changed files with 12 additions and 14 deletions
|
@ -526,8 +526,7 @@ void torrentAdditionDialog::on_browseButton_clicked() {
|
|||
QString new_path;
|
||||
QString root_folder;
|
||||
const QString label_name = comboLabel->currentText();
|
||||
if (!m_isMagnet) {
|
||||
if (m_torrentInfo->num_files() == 1) {
|
||||
if (!m_isMagnet && m_torrentInfo->num_files() == 1) {
|
||||
new_path = QFileDialog::getSaveFileName(this, tr("Choose save path"), savePathTxt->currentText(), QString(), 0, QFileDialog::DontConfirmOverwrite);
|
||||
if (!new_path.isEmpty()) {
|
||||
QStringList path_parts = new_path.replace("\\", "/").split("/");
|
||||
|
@ -540,7 +539,6 @@ void torrentAdditionDialog::on_browseButton_clicked() {
|
|||
// Construct new_path
|
||||
new_path = path_parts.join(QDir::separator());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QString truncated_path = getCurrentTruncatedSavePath(&root_folder);
|
||||
if (!truncated_path.isEmpty() && QDir(truncated_path).exists()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue