Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1376 closed bug (Invalid)

"Move storage" purges files in new directory

Reported by: Keiichi Owned by:
Priority: minor Milestone: Future
Component: GTK UI Version: 1.3.0
Keywords: Cc:


When the storage of an added torrent is moved to an existing directory with contents for that torrent, all old data is purged.

To reproduce:

  • Download a torrent and let it finish.
  • Move the data to a different directory
  • Remove the torrent only from deluge
  • Add the torrent again on a wrong directory
  • Move the storage afterward to the existing data
  • Data is lost

The pain for me was that I tried to add a bunch of already downloaded torrent, but specified a wrong directory to download them to in first instance and tried to move the storage to the existing location and lost the already downloaded data.

Change History (3)

comment:1 by andar, 14 years ago

Resolution: invalid
Status: newclosed

I'm not sure if this is a bug.. You're issuing a mv command. Shouldn't it overwrite data? Shouldn't you assume it does that?

comment:2 by Keiichi, 14 years ago

A warning would be at it's place I guess.

comment:3 by Frob, 14 years ago

Perhaps do a hash check on all conflicting files (and only the conflicting ones) in the destination folder? Then, if the files are the same, set the download location to the destination (without overwriting/erasing data) and remove the old data; otherwise issue a warning or ask the user what to do (overwrite or do nothing).

This could possibly be extended to do per-piece comparison between two sets of incompletely-downloaded files to merge them into one set of files. That's probably beyond the scope of this bug report though.

Note: See TracTickets for help on using tickets.