mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Explicitly set "added time" when adding new torrent
Don't overwrite "added time" with possibly incorrect value. Explicitly set "added time" when adding new torrent. PR #15644.
This commit is contained in:
parent
8a44c1f6d5
commit
cc61ad01b6
2 changed files with 3 additions and 2 deletions
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -2196,6 +2197,8 @@ bool Session::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &source
|
|||
else
|
||||
p.flags |= lt::torrent_flags::auto_managed;
|
||||
|
||||
p.added_time = std::time(nullptr);
|
||||
|
||||
if (!isFindingIncompleteFiles)
|
||||
return loadTorrent(loadTorrentParams);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue