From 3a237c93be61c9ffceff6237cc225a618bcaf855 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 14 Feb 2010 15:22:34 +0000 Subject: [PATCH] Make sure torrent save path is displayed --- src/propertieswidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index 91362d8ae..ce6913688 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -208,7 +208,10 @@ Bittorrent* PropertiesWidget::getBTSession() const { void PropertiesWidget::updateSavePath(QTorrentHandle& _h) { if(h.is_valid() && h == _h) { - save_path->setText(TorrentPersistentData::getSavePath(h.hash())); + QString p = TorrentPersistentData::getSavePath(h.hash()); + if(p.isEmpty()) + p = h.save_path(); + save_path->setText(p); } } @@ -223,7 +226,10 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) { try { // Save path - save_path->setText(TorrentPersistentData::getSavePath(h.hash())); + QString p = TorrentPersistentData::getSavePath(h.hash()); + if(p.isEmpty()) + p = h.save_path(); + save_path->setText(p); // Creation date lbl_creationDate->setText(h.creation_date()); // Hash