Skip to content

Commit

Permalink
Don't apply Mark-of-the-Web on existing files
Browse files Browse the repository at this point in the history
`TorrentImpl::isDownloading()` was excessively broad which included unexpected events for the
case here. So use the underlying state directly.

Close #21788.
  • Loading branch information
Chocobo1 committed Nov 14, 2024
1 parent 0f12d07 commit 6a2df8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/base/bittorrent/torrentimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_state == TorrentState::ForcedDownloading) || (m_state == TorrentState::Downloading)))
{
const Path fullpath = actualStorageLocation() / actualPath;
Utils::OS::applyMarkOfTheWeb(fullpath);
Expand Down

0 comments on commit 6a2df8e

Please sign in to comment.