mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
set location OVERWRITES a COMPLETED torrent #7158
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#7158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tehmasterer on GitHub (Apr 17, 2018).
Please provide the following information
qBittorrent version and Operating System
4.0.4 Windows 10 (10.0.1xxxx)
What is the problem
Using set location on a PAUSED, COMPLETED torrent will OVERWRITE the completed file. I just lost multiple shows because I thought it was moved and seeding. NOPE it was download and overwriting the entire thing again.
What is the expected behavior
set location should move a completed torrent. simple as that. the whole point of set location is so you can easily organize torrents and not have to force recheck.
Steps to reproduce
pause torrent > set location > watch torrent start overwriting
Extra info(if any)
this is disastrous. no other client has this problem.
I would like to add one tv show started downloading 20%. I played the file and it was all still OK. So I removed the torrent from qbittorrent. added it again, selected location on the hard drive, and force recheck. IT WENT TO 20% again. I checked the file AND IT OVERWROTE it. It doesn't matter if you remove the torrent and add it again, if even 1% is downloaded it will OVERWRITE your file.
@sledgehammer999 commented on GitHub (Apr 19, 2018):
Your description is a bit confusing.
The file was 20%. You re-add it and it goes to 20%. But then you claim it overwrote it. How is that?
@tehmasterer commented on GitHub (Apr 22, 2018):
I wanted to move the torrent, so I paused it and chose set location to another path on the drive. After I set location the torrent, which was completed weeks ago, started overwriting itself. I didn't notice it first but it got as far as 20%. I removed the torrent and added the link again to try and seed. My added torrents are always paused, so I set location, force recheck, and it went to 20%. I checked and played my file. It was overwritten with modification dates changed.
@Charles2904 commented on GitHub (Apr 30, 2018):
I have just used the "Set location" option to move a completed torrent with a single 40MB file from a hard drive to an SSD. It worked as I expected. It did exactly what uTorrent would have done. There was no indication that the torrent data was downloaded from the internet again.
Your description is still very unclear.
What exactly do you mean by "started overwriting itself"? When you say "overwrote" do you mean that qBittorrent has downloaded the file again? Do you mean that the torrent state changed to "Downloading"?
What exactly do you mean by " it got as far as 20%"? Do you mean that the torrent went to the "Downloading" state but only got as far as 20% complete? Or do you mean that when you do a recheck the result is that the torrent is indicated as only 20% done?
If you, or qBittorrent, move or copy a large file it is possible that you will see a Windows dialogue box showing the progress of the file move or copy. Is this what you are seeing? Are you mis-interpretting this as the file being downloaded from the internet again?
How big is the file and how long does it take to be "overwritten" as you describe it? If the file is large but the "overwriting" takes only seconds then the chances are that you are mis-interpretting a Windows message.
If you move, copy or modify a file in Windows then some or all of its time and date stamps will change. If you don't fully understand file date stamps in Windows then you shold not use them as an indication that the file has been downloaded from the internet again.
If you resolve this problem then please tell us how you fixed it !!!
@WeskerEnd commented on GitHub (Oct 27, 2018):
Okay, this just happened to me, I lost 24GB.
Let me try to explain. I had downloaded this file before, and since then, I moved it to another folder.
Now that I did what I had to do with it, I wanted to keep seeding it, but since I moved it, qBitTorrent doesn't know where it is.
So I right-clicked the torrent name in qB, clicked "Set Location", and INSTEAD OF CHECKING the file and validating it, it simply started downloading the full torrent again as if there were no files in that folder, which means it overwrote my complete file with a new 0% file of the same name.
Everytime I did this with µTorrent, it saw that the files were already there and instead Checked the torrent, now I'll have to download 24GB again if I want to keep seeding it. There were no warnings or anything.
EDIT: qB v4.1.3 / W10
@BlockABoots commented on GitHub (Apr 12, 2019):
Yep just had this happen to me!!!!!!!!!!!!!!
Lost 300GB worth of data!! Rather than the program checking to see if i already had the file it simply wiped the previous files and started downloading again. FUMMING!!!
@sledgehammer999 commented on GitHub (Apr 14, 2019):
@BlockABoots which qbt version are you using? And which OS?
I don't know how this keeps happening this was fixed in #7207 by @glassez in 2017!
@sledgehammer999 commented on GitHub (Apr 14, 2019):
@glassez I figured it out. From the docs in
torrent_handle.hpp:We never do pause-recheck-resume thus the file gets overwritten by downloading data. Do you have time to take another stab at it?
@glassez commented on GitHub (Apr 15, 2019):
Strange, why didn't I notice this part of the documentation at the time?..
Unfortunately, I will be very busy in my real life in the next few months, so I will not be able to devote as much time to the project as before. Apparently, I won't even be able to review other PRs as intensively as before (@Chocobo1, please note it too).
@BlockABoots commented on GitHub (Apr 15, 2019):
Im on version 4.1.5 and am using Windows 10
@sledgehammer999 commented on GitHub (Apr 15, 2019):
Out of curiosity I did a git-blame on the torrent_handle.hpp. And it isn't your fault. The documentation about that flag was clarified only ~10 months ago.
@tarcs999 commented on GitHub (Jul 26, 2019):
I have had this issue just now:
qB version 4.1.6 built w/ Qt 5.12.2, Libtorrent 1.1.13.0, Boost 1.70.0
Is this unexpected behaviour post #7207 or am I misinterpreting how I should be using this command?
@Piccirello commented on GitHub (Aug 4, 2019):
Duplicate of #127
@sledgehammer999 commented on GitHub (Aug 4, 2019):
@glassez May I remind you of this? Specifically see https://github.com/qbittorrent/qBittorrent/issues/8758#issuecomment-483040840
Do you want to look into it since you did some related work in master lately?
@glassez commented on GitHub (Aug 4, 2019):
I've been thinking about it lately...
@TomArrow commented on GitHub (Oct 3, 2019):
I had two folders on my hard drive, unsure which one was the completed one. I pointed the torrent on the uncompleted one by accident. It checked to around 10%.
Then I pointed it to the completed one. Guess what happened? Qbit overwrote the completed files with the 10% files.
This is absolutely horrendous and unacceptable. These are files that I've waited two years for a seeder for! It's sheer luck that I still have a backup of them on my seedbox.
It's unbelievable that this doesn't get fixed. This should be priority number 1. Whoever programmed this had zero respect or consideration for the final user's data.
This issue was well-explained and actually got the "data-loss" tag to show how important it is but got closed because "muh duplicate" and that badly formulated very abstract issue stays up as the original.
Again, UN-FUCKING-BELIEVABLE.
@MontFox commented on GitHub (Oct 22, 2019):
Just happened to me. Downloaded 60GB torrent on laptop to an external drive. Scanned it once on laptop, no issue. Plugged drive into desktop and pointed QBittorent to folder. Scanned it initially, then progress was back at 20%
@glassez commented on GitHub (Feb 7, 2020):
Seems it is fixed in latest libtorrent. It rechecks after moving storage if there are some appropriate files exist in destination directory.
@Piccirello commented on GitHub (Feb 12, 2020):
Is that change listed on the libtorrent changelog? I don't see one, but I'm likely overlooking it.
@glassez commented on GitHub (Feb 12, 2020):
I don't know.
I accidentally came across this logic in the libtorrent code when I was looking at it for some reason recently. Then I ran some tests to check it.
@Piccirello commented on GitHub (Feb 12, 2020):
Any chance you can recall what file/line it was? We can check the history from there.
@glassez commented on GitHub (Feb 13, 2020):
github.com/arvidn/libtorrent@ad83b1c0eb/src/torrent.cpp (L7789)@Piccirello commented on GitHub (Feb 14, 2020):
It doesn't appear this part of the logic is new. This is a pretty superficial search, but I don't have much to go off of.
@sledgehammer999 commented on GitHub (Feb 16, 2020):
@glassez since this an old issue and you might have forgotten, when moving we should implement extra logic to handle the move's actions. (link: http://libtorrent.org/reference-Storage.html#move_flags_t)
@glassez commented on GitHub (Feb 16, 2020):
What "extra logic" do you mean exactly?
@sledgehammer999 commented on GitHub (Feb 16, 2020):
I think I have mentioned it here: https://github.com/qbittorrent/qBittorrent/issues/8758#issuecomment-483040840
@glassez commented on GitHub (Feb 17, 2020):
The fact is that when I started working on this, I found that it works correctly: when an existing file is found in the target folder, the torrent is automatically transferred to "checking" state.
At first I thought it was fixed recently. But as it turns out, it existed even when this "confusing" comment you're referring to was added.
Here the appropriate status is set and here it is handled and torrent resets its state to "checking".
@arvidn?
@arvidn commented on GitHub (Feb 17, 2020):
is there some behavior in libtorrent here that's surprising or other than what's documented?
or is there some desired behavior that is not supported at all?
@glassez would you mind summarizing what you've found so far?
@glassez commented on GitHub (Feb 17, 2020):
Sure. I will do it ASAP. I need to perform some additional tests before.
@FranciscoPombal commented on GitHub (May 4, 2020):
@glassez is this still relevant?
@glassez commented on GitHub (May 5, 2020):
We talking about the case when we move torrent storage and want to use existing files in target location.
In reality, we have two contradictory things here. On the one hand, there is the above-mentioned comment in the libtorrent code, according to which it requires some additional actions to prevent existing files from being reset to current download progress (which is illogical from the user's perspective, since it turns out that the "function" does not perform the stated work). On the other hand, here is real lbtorrent code that sets the necessary flag itself if the existing file was used during the move, and automatically activates the check after the move is complete (this is quite expected behavior).
I tried to test it. I moved unfinished torrents (both actively downloading and paused) in the location with complete files and it uses the existing files (after recheck) in most cases. Only once existing file was reset to original torrent progress. But I never be able to reproduce it again.
So I'm confused...
@FranciscoPombal commented on GitHub (May 7, 2020):
Well, if anyone has problems or finds a way to reproduce such a problem in the latest version, please open a new issue report.
@Piccirello commented on GitHub (May 7, 2020):
Why would we lock this? This is still very much an issue. I experienced this a few days ago when redownloading a torrent that hadn't been moved out of my downloads folder, and @glassez was able to confirm reproducing it once.
@FranciscoPombal commented on GitHub (May 7, 2020):
@Piccirello sorry, I thought this was no longer reproducible. Do you happen to have more information?
@Piccirello commented on GitHub (May 7, 2020):
I don't have anything too substantive, but re-adding a previously completed torrent resulted in a full re-download on 4.2.5 with libtorrent 1.2.6. The file had failed to move out of the download folder to the completed folder. I wanted to re-trigger the move to debug, so I re-added the torrent. Upon re-adding the torrent it never rechecked and instead started from 0. I didn't trying debugging the issue any further.
You might have more luck in #127.
@glassez commented on GitHub (May 7, 2020):
@Piccirello
@glassez commented on GitHub (May 7, 2020):
@Piccirello, you are probably affected by another bug (or several bugs).
@luzpaz commented on GitHub (Jun 22, 2023):
is this ticket still relevant?
@TomArrow commented on GitHub (Jun 25, 2023):
Why wouldn't it be? Has there been a fix?
@hmpfkafka commented on GitHub (Jul 3, 2023):
holy fucking shit i just lost ALL of the data i had on my hard drive due to this bug, how the actual FUCK is this still an issue??? more than 100 gigs of private tracker data just gone to the dump, i literally can't express how angry i am. why would it start downloading the files when it's pointed in the location where the files are already there, i'm so frustrated and confused, i'm actually done.
@TomArrow commented on GitHub (Jul 3, 2023):
Sorry to hear mate. Doesn't seem they care.