Skip to content

Commit f4eec75

Browse files
authored
Don't apply Mark-of-the-Web on existing files
`TorrentImpl::isDownloading()` was excessively broad which included unexpected events for the case here. So use the underlying state directly. Closes qbittorrent#21788. PR qbittorrent#21836.
1 parent f73f316 commit f4eec75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/base/bittorrent/torrentimpl.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2388,7 +2388,8 @@ void TorrentImpl::handleFileCompletedAlert(const lt::file_completed_alert *p)
23882388

23892389
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
23902390
// only apply Mark-of-the-Web to new download files
2391-
if (Preferences::instance()->isMarkOfTheWebEnabled() && isDownloading())
2391+
if (Preferences::instance()->isMarkOfTheWebEnabled()
2392+
&& (m_nativeStatus.state == lt::torrent_status::downloading))
23922393
{
23932394
const Path fullpath = actualStorageLocation() / actualPath;
23942395
Utils::OS::applyMarkOfTheWeb(fullpath);

0 commit comments

Comments
 (0)