IO Errors when downloading torrents that contain files with identical filenames #13514

Open
opened 2026-02-22 00:01:15 -05:00 by deekerman · 6 comments
Owner

Originally created by @troymroberts on GitHub (Jun 7, 2022).

qBittorrent & operating system versions

qbittorrent: 4.4.3.1
os: Windows Sever

What is the problem?

So downloading torrents that contain multiple files. When using a temporary location c:\temp . and a set destination

Torrent AA contains the following files. Destination Download folder c:\AA

A1.txt
a1.jpg
a2.jpg
B1.txt

And torrent BB destination folder c:\BB contains:

A1.txt
a4.jpg
a5.jpg
B1.txt

When downloading, qbitorrent will fail to complete the torrents because Torrent AA and Torrent BB contain files with identical names and they will clash against each other.

Steps to reproduce

So downloading torrents that contain multiple files. When using a temporary location c:\temp . and a set destination

Torrent AA contains the following files. Destination Download folder c:\AA

A1.txt
a1.jpg
a2.jpg
B1.txt

And torrent BB destination folder c:\BB contains:

A1.txt
a4.jpg
a5.jpg
B1.txt

When downloading, qbitorrent will fail to complete the torrents because Torrent AA and Torrent BB contain files with identical names and they will clash against each other.

Additional context

No response

Log(s) & preferences file(s)

No response

Originally created by @troymroberts on GitHub (Jun 7, 2022). ### qBittorrent & operating system versions qbittorrent: 4.4.3.1 os: Windows Sever ### What is the problem? So downloading torrents that contain multiple files. When using a temporary location c:\temp . and a set destination Torrent AA contains the following files. Destination Download folder c:\AA A1.txt a1.jpg a2.jpg B1.txt And torrent BB destination folder c:\BB contains: A1.txt a4.jpg a5.jpg B1.txt When downloading, qbitorrent will fail to complete the torrents because Torrent AA and Torrent BB contain files with identical names and they will clash against each other. ### Steps to reproduce So downloading torrents that contain multiple files. When using a temporary location c:\temp . and a set destination Torrent AA contains the following files. Destination Download folder c:\AA A1.txt a1.jpg a2.jpg B1.txt And torrent BB destination folder c:\BB contains: A1.txt a4.jpg a5.jpg B1.txt When downloading, qbitorrent will fail to complete the torrents because Torrent AA and Torrent BB contain files with identical names and they will clash against each other. ### Additional context _No response_ ### Log(s) & preferences file(s) _No response_
Author
Owner

@Sophist-UK commented on GitHub (Jun 8, 2022):

I have the same issue. During download and before files are moved to their final locations, perhaps each torrent should be placed in a separate directory.

@Sophist-UK commented on GitHub (Jun 8, 2022): I have the same issue. During download and before files are moved to their final locations, perhaps each torrent should be placed in a separate directory.
Author
Owner

@troymroberts commented on GitHub (Jun 8, 2022):

I have the same issue. During download and before files are moved to their final locations, perhaps each torrent should be placed in a separate directory.

This was my thought as well and seems like the easiest solution.

@troymroberts commented on GitHub (Jun 8, 2022): > I have the same issue. During download and before files are moved to their final locations, perhaps each torrent should be placed in a separate directory. This was my thought as well and seems like the easiest solution.
Author
Owner

@DarkVoyage commented on GitHub (Jun 9, 2022):

This would be nonexistent problem, if you didn't not use illegal option "remove root folder". Said many times that it it should not be allowed to change torrent structure. Downloading files with identical names to identical places and moving of such files lead to corruption, errors, replacing the content - too many problems. I've lost about 20 torrents, because torrents imported from uTorrent come without root folder and after turning on automatic management, qB destroyed everything that was matching. This was some years ago, but I still could not replace the lost materials.

@DarkVoyage commented on GitHub (Jun 9, 2022): This would be nonexistent problem, if you didn't not use illegal option "remove root folder". Said many times that it it should not be allowed to change torrent structure. Downloading files with identical names to identical places and moving of such files lead to corruption, errors, replacing the content - too many problems. I've lost about 20 torrents, because torrents imported from uTorrent come without root folder and after turning on automatic management, qB destroyed everything that was matching. This was some years ago, but I still could not replace the lost materials.
Author
Owner

@Sophist-UK commented on GitHub (Jun 9, 2022):

I am not sure what this "remove root folder" option is, but AFAIK I do not use it and yet this is still an issue.

@Sophist-UK commented on GitHub (Jun 9, 2022): I am not sure what this "remove root folder" option is, but AFAIK I do not use it and yet this is still an issue.
Author
Owner

@DarkVoyage commented on GitHub (Jun 9, 2022):

Torrent with more than 1 file should contain root folder with files. This folder is put in your Temp folder by default and can't be replaced by other torrent with different name.

In other words should look like:

C:\Temp\Torrent-1\ %files%
C:\Temp\Torrent-2\ %files%

C:\AA\Torrent-1\ %files%
C:\BB\Torrent-2\ %files%

Impossible to mix up.

@DarkVoyage commented on GitHub (Jun 9, 2022): Torrent with more than 1 file should contain root folder with files. This folder is put in your Temp folder by default and can't be replaced by other torrent with different name. In other words should look like: C:\Temp\Torrent-1\ %files% C:\Temp\Torrent-2\ %files% C:\AA\Torrent-1\ %files% C:\BB\Torrent-2\ %files% Impossible to mix up.
Author
Owner

@Sophist-UK commented on GitHub (Jun 9, 2022):

Torrent with more than 1 file should contain root folder with files

  1. That may be a good idea, but I don't have control over whether the torrent does this.

  2. You are assuming that you are not downloading two different torrents with identical folder names (which will have different final destinations). If both Torrent1 and Torrent2 have a structure Folder\%files% then files will still be mixed up.

What is needed is to include the Torrent hash as a folder name so that we get:

C:\Temp\hash1\Folder\ %files%
C:\Temp\hash2\Folder\ %files%

C:\AA\Folder\ %files%
C:\BB\Folder\ %files%
@Sophist-UK commented on GitHub (Jun 9, 2022): > Torrent with more than 1 file should contain root folder with files 1. That may be a good idea, but I don't have control over whether the torrent does this. 2. You are assuming that you are not downloading two different torrents with identical folder names (which will have different final destinations). If both Torrent1 and Torrent2 have a structure `Folder\%files%` then files will still be mixed up. What is needed is to include the Torrent hash as a folder name so that we get: ``` C:\Temp\hash1\Folder\ %files% C:\Temp\hash2\Folder\ %files% C:\AA\Folder\ %files% C:\BB\Folder\ %files% ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#13514
No description provided.