flood icon indicating copy to clipboard operation
flood copied to clipboard

"Set torrent location" doesn't behave as expected with torrents using a folder structure

Open DameGAD opened this issue 2 years ago • 2 comments

Type: Bug Report

Your Environment

  • Version used: 4.7.0
    • Commit ID (development release) : I don't know
  • Environment name and version:
    • Node.js version 16.10.0
    • npm version : I don't know
    • Web browser : Brave v1.40.113
  • Operating system and version: macOS 12.0.1
  • Torrent client and version: I use the image jesec/rtorrent v0.9.8-r16

Summary

When adding a torrent without folder, Flood behave as expected. But it doesn't behave as expected with torrents using a folder structure and creates errors.

Expected Behavior

Let's say I download the torrent Amazing-movie.mkv in the directory /volume1/Movies. The path displayed is /volume1/Movies and the movie can be found at /volume1/Movies/amazing-movie.mkv. Everything works just fine.

If I add a torrent at the exact same location /volume1/Movies but this time with a folder, like /Amazing-movie/amazing-movie.mkv, the movie can be found at /volume1/Movies/Amazing-movie/amazing-movie.mkv. The path displayed should still be /volume1/Movies. If I right click and select "Set torrent location", doesn't alter the path and validate "Set location", the torrent should still be at the same location and the path still be /volume1/Movies.

Current Behavior

However this is not what happens. If I download a torrent with a folder /Amazing-movie/amazing-movie.mkv at the location /volume1/Movies, the path displayed is /volume1/Movies/Amazing-movie, so it includes the torrent's folder. If I right click on this torrent and choose "set torrent location", don't alter the path at all and validate "set location", the path become /volume1/Movies/Amazing-movie/Amazing-movie but the movie is still at /volume1/Movies/Amazing-movie/amazing-movie.mkv and it creates an error.

I guess it is not a big bug – there is no loss of data – but it would be nice to see it fixed.

Possible Solution

I guess removing the folder's torrent from the torrent's path ?

Steps to Reproduce

  1. Right click "Set torrent location" on any torrent with a folder structure.
  2. Valid "Set location" without altering the displayed path.
  3. See the result.

DameGAD avatar Jul 17 '22 10:07 DameGAD

I agree with this. The workaround is to use the "Use as base path" option in the "set location" dialog box. Then it behaves as expected.

saadbruno avatar Aug 21 '22 15:08 saadbruno

I just got confused by this behavior as well, and using the "Use as base path"-option with the path I wanted to files to be at resulted in the whole folder disappearing from my filesystem. I guess, I have to redownload my torrent now ...

ChrisK2 avatar Apr 04 '24 16:04 ChrisK2