qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.63k stars 4.01k forks source link

BUG: Actual file location does not match the assigned torrent save location #18547

Open extesy opened 1 year ago

extesy commented 1 year ago

qBittorrent & operating system versions

qBittorrent: 4.5.0 x64 Operating system: Windows 11 Pro 22H2 (10.0.22621)

What is the problem?

A torrent for pre-existing files was loaded into qTorrent. Before starting a download, I changed the save location to match the current location of those files. "Force recheck" didn't work so I had to copy files into the temporary download folder, then it worked. However now it still expects the files to be in the temporary location instead of a destination one.

  1. Save location: image
  2. Right click on the torrent and "open destination folder": image
  3. This is a temporary location, not the one that is set for that torrent. image

Steps to reproduce

  1. Have some already downloaded files at FILES_LOCATION.
  2. Configure qTorrent to use location for incomplete downloads: TEMP_LOCATION.
  3. Load the torrent file with contents matching the existing files.
  4. Do not start downloading. Instead, right click and chose "Set Location" to point to FILES_LOCATION.
  5. BUG1: Right click and choose "force recheck" - nothing happens.
  6. Manually copy files from FILES_LOCATION to TEMP_LOCATION.
  7. Right click and choose "force recheck" - the torrent checks to 100%, briefly goes through "moving files" and then switches to "seeding" mode.
  8. Resume the torrent.
  9. BUG2: Right click on the torrent and choose "open destination folder". It opens the TEMP_LOCATION instead of FILES_LOCATION.

Additional context

There is a hacky workaround. Assume there is a new random folder we can use RANDOM_LOCATION.

  1. Right click and chose "Set Location" to point to RANDOM_LOCATION.
  2. Right click and chose "Set Location" to point to FILES_LOCATION. We already did it in step 4 but it did not work that time. Now the location is fixed but it should have worked the first time.

Log(s) & preferences file(s)

data.zip

DarkVoyage commented 1 year ago

Looks a lot like #18495 and #18297 that appeared only in 4.5.0. There was no problem with rehashing in older versions, especially with manual relocation there's no problem even in 4.5.0. Anyway this is fixed in next release. Make sure you have alternative path for unfinished jobs turned off.

extesy commented 1 year ago

there's no problem even in 4.5.0

I am using 4.5.0 and there is a problem, please see the repro steps. I will check the next version whenever it releases.

glassez commented 1 year ago

4. Do not start downloading. Instead, right click and chose "Set Location" to point to FILES_LOCATION.

Set location is some kind of rudimentary. It does change "Save path" actually. And qBittorrent doesn't still look at "complete" save path when rechecking incomplete torrent and "incomplete" save path is configured to be used.

extesy commented 1 year ago

And qBittorrent doesn't still look at "complete" save path when rechecking incomplete torrent and "incomplete" save path is configured to be used.

And what is the correct workflow for when I want to seed existing files without redownloading them?

glassez commented 1 year ago

And what is the correct workflow for when I want to seed existing files without redownloading them?

Perform your steps 1-3 above and then change "incomplete" save path of torrent instead of "Set location" (assuming you use v4.5.1)

Otherwise you can initially point torrent to the location where existing files are placed (using Add new torrent dialog)

DarkVoyage commented 1 year ago

I am using 4.5.0 and there is a problem, please see the repro steps. I will check the next version whenever it releases.

4.5.1 resolves that. It works as it should, my favorite version now. Now it can rehash multiple torrents at once - that's so great.