LCExtractor icon indicating copy to clipboard operation
LCExtractor copied to clipboard

Archive containing archive which overwrites other archive

Open micke opened this issue 7 years ago • 4 comments

I've come upon a pretty annoying edge-case where a torrent contains two archives. The first archive is an archive with the subtitles and a nested archive within itself. The second archive is an archive of the movie. Because unrar is run with -o+ the movie archive gets overwritten resulting in the movie being lost.

Best illustrated like this:

  • ubuntu-subs.rar
    • ubuntu.srt
    • ubuntu.rar
  • ubuntu.rar
    • ubuntu.mkv
  • ubuntu.r00
  • ubuntu.r01 ...

The big question is why would someone do it like this and i don't really have an answer to that but it has happened to me enough times to be a problem.

One way to resolve this would be to run unrar with the -or flag which renames files that would otherwise overwrite another file. In the above example ubuntu.rar would become ubuntu (1).rar

As for the other commands i haven't really looked into alternatives to rename instead of overwrite.

micke avatar Jan 02 '18 15:01 micke

That is strange that someone would create an archive like that. I haven't run into any torrents that do this yet. Thank you for reporting the issue, I will look into it when I have some extra time

levic92 avatar Jan 17 '18 18:01 levic92

Yeah, really strange and really annoying. Took me a while to understand why half of my downloads failed. Apparently a lot of torrents on torrentleech are like that...

In the meantime i've been running my fix without any issues from here https://github.com/lisinge/LCExtractor/commit/cf8243041fdbd890c4a40a9e7bd39c4feb8ccd0d. It's only fixed for rars though.

micke avatar Jan 17 '18 20:01 micke

I hit this problem as well today. I had to disable the plugin, recheck+download and manually extract as a workaround. Will try micke's fix now. I can provide an example torrent if contacted privately on gitter. Running on linux

dabear avatar Nov 18 '18 10:11 dabear

I'm seeing this as well. It's extremely frustrating. I'll try micke's fix as well until we see something from @levic92 (great plugin, by the way!)

arcmodo avatar Jan 23 '19 01:01 arcmodo