mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Deselecting files for download makes unexpected folders #8700
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#8700
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 @speedstyle on GitHub (May 18, 2019).
qBittorrent version and Operating System
qBittorrent v4.1.5 on Lubuntu 19.04 with libtorrent v1.1.11.0 and Qt v5.11.2
What is the problem
If a text file is deselected for download before it is created, a containing folder is created.
What is the expected behavior
No changes other than deselection
Steps to reproduce
name.txtin the torrent so that it will not downloadThe unchecked file now appears as
name.txt\name.txti.e. resides in a directory of the same name. Rechecking the file for download does not change this,NB
I gave the steps which I had followed to achieve this error, you may be able to achieve it with a torrent file, or with 'subfolder' checked, etc. but this is my normal workflow.
Text files which have already been downloaded are not affected, nor could I find any non-txt files which did this.
EDIT
Any file which has not started to download is affected. (I noticed it on txt files as they are often the smallest and so download later.)
EDIT2
Reproduced in the Web UI:
the deselected item
filenamegets immediately renamed tofilename\.unwanted\filename, and on deselection is renamed tofilename\filename. Selecting and deselecting toggles between these, with no way to download the file (as per default) into the main download directory.@a-raccoon commented on GitHub (May 18, 2019):
By default, every new torrent is placed into a subfolder of your main download directory.
When you deselect files, they are placed into the .\unwanted folder as a form of tracking which files you have deselected. This is not stored in your system registry, nor an ini file, nor an xml file. It's a .unwanted folder instead.
C:\MyDownloads\Torrent Name\.unwanted\Unwanted File
@speedstyle commented on GitHub (May 19, 2019):
Re-read my initial bug report.
A default option which I uncheck on adding torrents.
The
.unwantedfolder is a deprecated (#2659) place to store files which we don't want to download, but need to partially or fully download as they share pieces with downloaded files. This is not a form of tracking - which is stored with the rest of the torrent metadata in~\.local\share\data\qBittorrent\BT_backup\<hash>.fastresume.See the subfolder comment above; also, I don't have a C drive as I am running Lubuntu Disco as per my initial bug report.
@speedstyle commented on GitHub (May 19, 2019):
My guess is that this is a bug relating to the implementation of #2659: previously, if a subfolder wasn't used for each torrent, unwanted files would need a folder to go into (so that the
.unwantedfolder wasn't shared between lots of torrents). Now that<hash>.partsfiles are used instead, this shouldn't be necessary, but the folders are still created.@thalieht commented on GitHub (May 19, 2019):
Duplicate of #9242
/offtopic
.unwanted is the folder that unwanted files go when they are unchecked after they have been partially/completely downloaded. The .unwanted folder is completely a qBittorrent thing while .parts file is handled by libtorrent. Don't quote me on this because i'm not very familiar with libtorrent but i don't think it's possible to add pieces to the .parts file after the torrent has been added to the session. If it was, .unwanted would truly be redundant.
@speedstyle commented on GitHub (May 19, 2019):
OK, I'll watch its progress there.
I didn't realize that: does that mean I can avoid these folders by unchecking files in the torrent add window rather than later? What if I select something previously unselected for download - does it get pulled out the
.partsfile? Also, all of the torrents I've been testing this on have just one or two pieces downloaded: why are the.unwantedfolders still created?@thalieht commented on GitHub (May 19, 2019):
In your case no because as stated in the other issue it's a bug when not using "Create subfolder" but with that option yes.
Yes.
Not sure what you mean but in general, AFAIK, the .unwanted code hasn't been touched in years so old issues are still present with it. I think that's mainly because at some point the devs wanted to remove the .unwanted folder functionality.
@speedstyle commented on GitHub (May 19, 2019):
Both this and the other issue refer specifically to selecting or deselecting things after they are added to the session, so I just meant I should be able to workaround the issue (while it is still a bug) by deciding which things to download before adding them, and re-adding them where I need to change something.
I meant that the text file hadn't actually been downloaded yet: the torrent had barely started. I was wondering why setting them not to download - when they hadn't yet been downloaded - would create the folders (could it be to do with 'pre-allocate disk space' being checked?).
@a-raccoon commented on GitHub (May 19, 2019):
I'm not sure if this has been fully touched on, or if it answers your question, but even though you deselected a small text file, qBittorrent still NEEDS to download that small text file if it shares a part-chunk of your wanted file(s).
Example: Your text file is only 100 KB. The torrent is chunked into 80 MB parts. Your unwanted text file is part of an 80 MB chunk that belongs to the linux distro ISO that you are attempting to download, and so the unwanted text file still needs to be downloaded so a hash check calculation can be performed on the whole 80 MB chunk to validate the download was successful.
@thalieht commented on GitHub (May 19, 2019):
Creating empty folders was fixed some time ago so this is probably part of the problem with not using subfolder but unless it is tested, i wouldn't rule out some missed edge case like the one you mentioned.