mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-28 10:48:19 +03:00
parent
604986e90f
commit
1e88650bae
1 changed files with 11 additions and 8 deletions
|
@ -100,13 +100,15 @@ namespace
|
||||||
|
|
||||||
void openDestinationFolder(const BitTorrent::Torrent *const torrent)
|
void openDestinationFolder(const BitTorrent::Torrent *const torrent)
|
||||||
{
|
{
|
||||||
|
const Path contentPath = torrent->contentPath();
|
||||||
|
const Path openedPath = (!contentPath.isEmpty() ? contentPath : torrent->savePath());
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
MacUtils::openFiles({torrent->contentPath()});
|
MacUtils::openFiles({openedPath});
|
||||||
#else
|
#else
|
||||||
if (torrent->filesCount() == 1)
|
if (torrent->filesCount() == 1)
|
||||||
Utils::Gui::openFolderSelect(torrent->contentPath());
|
Utils::Gui::openFolderSelect(openedPath);
|
||||||
else
|
else
|
||||||
Utils::Gui::openPath(torrent->contentPath());
|
Utils::Gui::openPath(openedPath);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,21 +589,22 @@ void TransferListWidget::openSelectedTorrentsFolder() const
|
||||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||||
{
|
{
|
||||||
const Path contentPath = torrent->contentPath();
|
const Path contentPath = torrent->contentPath();
|
||||||
paths.insert(contentPath);
|
paths.insert(!contentPath.isEmpty() ? contentPath : torrent->savePath());
|
||||||
}
|
}
|
||||||
MacUtils::openFiles(PathList(paths.cbegin(), paths.cend()));
|
MacUtils::openFiles(PathList(paths.cbegin(), paths.cend()));
|
||||||
#else
|
#else
|
||||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||||
{
|
{
|
||||||
const Path contentPath = torrent->contentPath();
|
const Path contentPath = torrent->contentPath();
|
||||||
if (!paths.contains(contentPath))
|
const Path openedPath = (!contentPath.isEmpty() ? contentPath : torrent->savePath());
|
||||||
|
if (!paths.contains(openedPath))
|
||||||
{
|
{
|
||||||
if (torrent->filesCount() == 1)
|
if (torrent->filesCount() == 1)
|
||||||
Utils::Gui::openFolderSelect(contentPath);
|
Utils::Gui::openFolderSelect(openedPath);
|
||||||
else
|
else
|
||||||
Utils::Gui::openPath(contentPath);
|
Utils::Gui::openPath(openedPath);
|
||||||
}
|
}
|
||||||
paths.insert(contentPath);
|
paths.insert(openedPath);
|
||||||
}
|
}
|
||||||
#endif // Q_OS_MACOS
|
#endif // Q_OS_MACOS
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue