mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Fix TorrentHandle path methods. Closes #3847.
This commit is contained in:
parent
d0ebe08bf5
commit
501ab07024
8 changed files with 89 additions and 52 deletions
|
@ -213,9 +213,9 @@ void TransferListWidget::torrentDoubleClicked(const QModelIndex& index)
|
|||
break;
|
||||
case OPEN_DEST:
|
||||
if (torrent->filesCount() == 1)
|
||||
Utils::Misc::openFolderSelect(QDir(torrent->rootPath()).absoluteFilePath(torrent->filePath(0)));
|
||||
Utils::Misc::openFolderSelect(torrent->contentPath(true));
|
||||
else
|
||||
Utils::Misc::openPath(torrent->rootPath());
|
||||
Utils::Misc::openPath(torrent->contentPath(true));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -383,15 +383,11 @@ void TransferListWidget::openSelectedTorrentsFolder() const
|
|||
{
|
||||
QSet<QString> pathsList;
|
||||
foreach (BitTorrent::TorrentHandle *const torrent, getSelectedTorrents()) {
|
||||
QString path;
|
||||
if (torrent->filesCount() == 1) {
|
||||
path = QDir(torrent->rootPath()).absoluteFilePath(torrent->filePath(0));
|
||||
if (!pathsList.contains(path))
|
||||
QString path = torrent->contentPath(true);
|
||||
if (!pathsList.contains(path)) {
|
||||
if (torrent->filesCount() == 1)
|
||||
Utils::Misc::openFolderSelect(path);
|
||||
}
|
||||
else {
|
||||
path = torrent->rootPath();
|
||||
if (!pathsList.contains(path))
|
||||
else
|
||||
Utils::Misc::openPath(path);
|
||||
}
|
||||
pathsList.insert(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue