Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1258 closed Bug (wontfix)

Torrents with same files overwrite each other

Reported by: rb07 Owned by: charles
Priority: Low Milestone: None Set
Component: Daemon Version: 1.34
Severity: Minor Keywords:
Cc:

Description

Ran into this problem when one torrent was deleted from the tracker, I stopped downloading, found an alternative torrent and started it.

Afterward I was going to delete the partially downloaded first torrent... and I couldn't find it, looked an the .torrent files and found that both torrents had the same files, names only, different sizes.

The second torrent was downloading over the same directory and files as the first. The odd thing that caught my attention is that the main file had the size of the the first torrent, so the second one happily is overwriting it and will end up with a larger sized file (probably no problem).

No major problem in this example, but what if you really wanted 2 copies of the same torrent from different sources? or the case where, just by coincidence, two torrents do have the same named main directory? don't mind the files, but you'll probably get a mixed set of files.

The server should have some protection against this; I'm thinking about distinguishing torrents by their hash. That would not present a problem if dealing with a partially downloaded torrent, perhaps from a different client.

The client should also have the protection, a simple "File exists, do you want to overwrite?", that would not need to check hash code.

Change History (4)

comment:1 Changed 13 years ago by charles

  • Resolution set to wontfix
  • Status changed from new to closed

If you really wanted two copies of the same torrent from different sources, you would save them in different locations from one another.

IMO this is a handful of extra work for a fringe case.

comment:2 Changed 13 years ago by rb07

  • Priority changed from Normal to Low
  • Resolution wontfix deleted
  • Severity changed from Normal to Minor
  • Status changed from closed to reopened
  • Version changed from 1.33 to 1.34

Looks to me you didn't read the report carefully.

It's not that I want 2 copies from different sources, that was only an example of another possible situation, focus on what happens when 2 different torrents write to the same directory and same files.

Or lets put it another way: why should Transmission overwrite files? That seems like a bad practice. I also mentioned one case when the user does want Transmission to overwrite files, when you change torrent clients and want to continue a partially downloaded torrent.

I changed priority and severity to low, but I don't agree that this is a 'fringe case', didn't my report show it was 'unexpected behavior'?

comment:3 Changed 13 years ago by charles

  • Resolution set to wontfix
  • Status changed from reopened to closed

rb07: I was quoting the use case you gave in the original description: "No major problem in this example, but what if you really wanted 2 copies of the same torrent from different sources?"

comment:4 Changed 13 years ago by rb07

You misunderstood what I said. "No problem in this case" meant that in this particular case, I had no problem, no big deal but that doesn't make it not a problem; the other part is just an example.

I must underline that the problem is Transmission overwriting files. Not when the torrent is partially downloaded, but when it starts downloading.

Note: See TracTickets for help on using tickets.