From f22f7cf17a21e1862a6d8d4c7f20bd9eb8de6566 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 31 Aug 2014 00:05:38 +0300 Subject: [PATCH] Fix available disk space label on single file torrents. --- src/addnewtorrentdialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/addnewtorrentdialog.cpp b/src/addnewtorrentdialog.cpp index d34362a5e..aceca8fdc 100644 --- a/src/addnewtorrentdialog.cpp +++ b/src/addnewtorrentdialog.cpp @@ -301,7 +301,9 @@ void AddNewTorrentDialog::updateDiskSpaceLabel() { QString size_string = torrent_size ? misc::friendlyUnit(torrent_size) : QString(tr("Not Available", "This size is unavailable.")); size_string += " ("; - size_string += tr("Disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(ui->save_path_combo->currentText()))); + size_string += tr("Disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath( + ui->save_path_combo->itemData( + ui->save_path_combo->currentIndex()).toString()))); size_string += ")"; ui->size_lbl->setText(size_string); }