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

Files not moved to save location when too long #10121

ashleywaite opened this Issue Jan 6, 2019 · 1 comment


None yet
3 participants
Copy link

ashleywaite commented Jan 6, 2019

qBittorrent version and Operating System

Windows 7 (64-bit)
qBittorrent v4.1.5 (64-bit)
Libtorrent v1.1.11.0 (according to about)

What is the problem

Files that have a long file name are downloaded fine, but are not moved when the torrent is completed and relocated to the save directory.
It will now subsequently throw I\O errors when attempting to seed from any files that failed to move as they are not in the new location. They are still in the incomplete location however!

In the case I encountered it, the subdirectory was 190 characters long and successfully created in the save location, but all the files within that subdirectory exceeded 255 characters (full path name) and were not moved.

When I subsequently relocated the torrent by changing category when using Automatic Torrent Management the empty directory was not created in the new location moved to and still no errors reported in the log. The files were just absent and the move reported no errors!

What is the expected behavior

Files with long file names should to be moved!
When files fail to be moved, proper errors should be reported in the log.
It should not incorrectly claim in the log that it was "Successfully moved"!
When files are absent and moving a torrent, it should not claim in the log that it was "Successfully moved"

Steps to reproduce

Failure to move or report error on completion

  1. Set an incomplete location different to download location
  2. Download a torrent with multiple files, where some files and subdirectories exceed the win32 api file name limit (255 chars)
  3. Wait for torrent to finish

Log will now report a successful move to save location, but files with a long file name will be absent from save location and still remain in incomplete location

Failure to move or report error on location move

  1. Set torrent to Automatic Torrent Management
  2. Assign torrent to a category with a different save location.

Log will now report a successful move to new location in spite of files being absent

Extra info

This will likely be a consequence of not using the \\?\ prefix when moving files via the win32 api.
Details about this limitation are in this microsoft doc.

Potentially same issue as #9447 if reporter didn't realise it was the moving on completion that caused the problem, and not the downloading itself. If you check the save location the files are missing as they were not moved, so it would be easy to think they were not downloaded, but they are present in the incomplete location!


This comment has been minimized.

Copy link

annomatik commented Jan 14, 2019

same here, thanks for reporting. I have to check each "completed" directory, if there are leftovers in the "download" directory. If so, I have to move them manually with Total Commander. Total Commander will report, that the length limit is exceeded but will be able to move anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment