Improve move storage handling

PR #18857.
Closes #18795.
This commit is contained in:
Vladimir Golovnev 2023-04-18 08:06:18 +03:00 committed by GitHub
parent 1fe006d16f
commit 51132c817b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 40 deletions

View file

@ -87,6 +87,7 @@ namespace BitTorrent
struct LoadTorrentParams;
enum class MoveStorageMode;
enum class MoveStorageContext;
struct SessionMetricIndices
{
@ -439,7 +440,7 @@ namespace BitTorrent
void handleTorrentResumeDataReady(TorrentImpl *const torrent, const LoadTorrentParams &data);
void handleTorrentInfoHashChanged(TorrentImpl *torrent, const InfoHash &prevInfoHash);
bool addMoveTorrentStorageJob(TorrentImpl *torrent, const Path &newPath, MoveStorageMode mode);
bool addMoveTorrentStorageJob(TorrentImpl *torrent, const Path &newPath, MoveStorageMode mode, MoveStorageContext context);
void findIncompleteFiles(const TorrentInfo &torrentInfo, const Path &savePath
, const Path &downloadPath, const PathList &filePaths = {}) const;
@ -482,6 +483,7 @@ namespace BitTorrent
lt::torrent_handle torrentHandle;
Path path;
MoveStorageMode mode;
MoveStorageContext context;
};
struct RemovingTorrentData