-
-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File preallocation does not work after its priority is changed from "do not download" #7732
Comments
I had a torrent 100%, then switched off file, then deleted file, then enabled file. It allocates 0 byte file on the disk with sparse metadata of correct size of that file. There is no bug... Qbittorrent 5.0.0beta1 still has those issues: no rehashing of specific folders or files without full rehashing, Tixati has it; issues with restarting torrents if you delete specific files without first disabling them... |
I don't really get what you are trying to say. Preallocation is supposed to create a file with its full size. Like |
I am not sure such a mode makes any sense, but sure, if there is undefined behaviour where you first open file and then change open properties... Can you submit a patch? Fork this repo, click edit in the file in your repo, click pull request on this repo, submit changes. |
That's how it works right now. Add a new torrent (without checking or unchecking the files), start it, and you'll see that full-sized files are created on first access.
Yes. I just waited for @arvidn's response on it. But I guess it could be reviewed as a PR. |
Fixed in #7738. |
libtorrent version (or branch): 2.0.10
platform/architecture: Linux
File preallocation does not work after its priority is changed from "do not download".
It is reproducible if you try to download additional files on a partial torrent.
I see that
open_file_impl
intentionally checks fordont_download
priority.libtorrent/src/mmap_storage.cpp
Lines 899 to 901 in 2ab8fed
But the problem is,
set_file_priority
opens the file before updating the priority.libtorrent/src/mmap_storage.cpp
Lines 164 to 172 in 2ab8fed
This patch fixes the issue:
But I'm not sure how appropriate it is. What do you think, @arvidn?
The text was updated successfully, but these errors were encountered: