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 #21788.
PR #21836.
This commit is contained in:
Chocobo1 2024-11-16 15:57:55 +08:00 committed by GitHub
parent f73f31619d
commit f4eec75488
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2388,7 +2388,8 @@ void TorrentImpl::handleFileCompletedAlert(const lt::file_completed_alert *p)
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
// only apply Mark-of-the-Web to new download files
if (Preferences::instance()->isMarkOfTheWebEnabled() && isDownloading())
if (Preferences::instance()->isMarkOfTheWebEnabled()
&& (m_nativeStatus.state == lt::torrent_status::downloading))
{
const Path fullpath = actualStorageLocation() / actualPath;
Utils::OS::applyMarkOfTheWeb(fullpath);