#2833: multiple torrents with overlapping folder structures lose incomplete 
files
when 1st torrent completes
-------------------------------------------------+-------------------------
 Reporter:  eguled                               |      Owner:
     Type:  bug                                  |     Status:  new
 Priority:  major                                |  Milestone:  needs
                                                 |  verified
Component:  Unknown                              |    Version:  1.3.12
 Keywords:  overlaps incomplete moved folders    |
  temporary files completed                      |
-------------------------------------------------+-------------------------
 I have seen this issue multiple times, with multiple torrent sets under
 Deluge v1.3.12 (libtorrent v1.0.6.0) running on Windows 7 x64. This issue
 can result in lost data which can be expensive if the files involved are
 large and the bandwidth is metered... :-(

 Issue:
 Start 2 different torrents that each contain an overlapping folder
 structure. Let's call them "A" and "B".

 While downloading, files for both A and B are stored in the same parent
 folder under the Deluge working/incomplete files directory.

 When torrent A completes downloading, if the users has selected the option
 to "move completed to" [user-specific folder], then the entire parent
 directory -- and consequentially all the files for *both* torrents -- gets
 moved rather than moving only the completed files for torrent A. The
 result is that torrent A completes successfully and files are moved to
 correct location, but that torrent B loses any progress it had an shows an
 Error in the UI.


 I'm not sure if this happens in Deluge itself or in libtorrent (I suspect
 it may be the latter). But it seems like the fix would be to be to, on
 completion, a) first check if the folder overlaps with another incomplete
 torrent, if not proceed as normal. if overlap is found, have the code
 enumerate the individual files of the completed torrent and move them 1x1
 rather than simple moving the directory. this could potentially leave
 empty folders behind in the temp directory unless they are accounted for
 as well, but I think that is a much better consequence than lost data.


 == Simple, contrived example: ==

 Torrent A contains:
 livediscs\lmde-2-201503-cinnamon-64bit.iso

 Torrent B contains:
 livediscs\linuxmint-17.3-cinnamon-64bit.iso

 WIP location:
 D:\temp

 "Move Completed To" location:
 D:\Downloads

 === **Current behavior:** ===
 ||= Point in time =||= Torrent =||= State = ||= Location =||
 || start || A || In-Progress || D:\temp\livediscs\lmde-2-201503-cinnamon-
 64bit.iso ||
 || start || B || In-Progress || D:\temp\livediscs\linuxmint-17.3-cinnamon-
 64bit.iso ||
 || A has finished || A || Complete || D:\Downloads\livediscs\lmde-2-201503
 -cinnamon-64bit.iso||
 || A has finished || B || **In-Progress** ||
 **D:\Downloads**\livediscs\linuxmint-17.3-cinnamon-64bit.iso ||

 === **Expected behavior:** ===
 ||= Point in time =||= Torrent =||= State = ||= Location =||
 || start || A || In-Progress  || D:\temp\livediscs\lmde-2-201503-cinnamon-
 64bit.iso ||
 || start || B || In-Progress  || D:\temp\livediscs\linuxmint-17.3
 -cinnamon-64bit.iso ||
 || A has finished || A || Complete || D:\Downloads\livediscs\lmde-2-201503
 -cinnamon-64bit.iso||
 || A has finished || B || **In-Progress** ||
 **D:\temp**\livediscs\linuxmint-17.3-cinnamon-64bit.iso ||

--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2833>
Deluge <http://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to