G
G
Godless2016-05-13 16:12:25
bittorrent
Godless, 2016-05-13 16:12:25

How to download a torrent with long filenames inside?

Good day.
Problem: There is a torrent or magnet. There are many files inside. files with names of about 170 characters.
+ folders, nesting up to 5. names are also not short...
FS: Ext4, Ubuntu 14.04.
Question: How to download it? file name in 255 characters. Transmission breaks down on many files with a File Name Too Long error, aria2c goes out with the same error.
Are there clients able to truncate the filename if necessary?
I thought I would make some sort of FS thread in a file, mount it and download aira2c there. But according to the table , the file name for all is a maximum of 255 characters ...
It seems like reiserfs can do 4k names, but it didn’t work on it either - the same error. Seems like a Linux limitation.
Does anyone know how to treat?
UPD . here is the reason:

Length of filename is 377 bytes (this is length of raw C string). It is encoded in UTF-8. If we transcode it to UTF-16, we will get length of 206 wide characters. It easily fit onto Windows NTFS, as it use UCS-2 encoding and allows 255 wide characters, effectively 510 bytes.
But utf-8 presentation requires 377 bytes, so cannot be used as filename in unixes, as they limit name by 255 bytes, and, I repeat, modern OS'es doesn't use national codepages and do write utf-8 filenames to disk structures as-is.

Disinfect on ntfs.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hobbyte, 2016-05-14
@Godless

As nonsense:
Create a raw disk file with reiserfs, mount, merge there, do what you need, unmount, kill the file.

S
starlurk, 2021-07-20
@starlurk

There is one more option.
Directly in the transmission itself, you can change the name of the downloaded file.
Right-click on the distribution, then properties, files, change the file name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question