libtorrent icon indicating copy to clipboard operation
libtorrent copied to clipboard

Do not move files that are currently "unreferenced" by any downloaded piece

Open glassez opened this issue 2 years ago • 4 comments

libtorrent should never touch those files that are not accounted in the current progress. I.e. if the file does not intersect with any currently downloaded/checked data, then it should not be affected either when renaming the file or when moving the storage. This would help in resolving various file name conflicts (especially when working with magnet links, when we do not know about the contents of the torrent before receiving metadata).

glassez avatar Nov 16 '23 17:11 glassez

as far as I can tell, your patch fixes this issue.

arvidn avatar Feb 17 '24 19:02 arvidn

as far as I can tell, your patch fixes this issue.

Unfortunately, no. My patch is about something else.

glassez avatar Feb 17 '24 20:02 glassez

oh, I see. If a torrent needs checking, no files on disk is technically associated with it. In that scenario, it's not obvious what to do. Or if storage is moved while checking it.

Right now, any file that would have been downloaded by the torrent is associated with it, and is moved.

arvidn avatar Feb 17 '24 20:02 arvidn

Right now, any file that would have been downloaded by the torrent is associated with it, and is moved.

That's exactly the problem. And we can't work around it without any not very reliable and convenient tricks in some cases, even with the help of the patch mentioned above, especially if it's not about moving storage, but renaming files.

glassez avatar Feb 18 '24 14:02 glassez