Answer the question
In order to leave comments, you need to log in
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.
Answer the question
In order to leave comments, you need to log in
As nonsense:
Create a raw disk file with reiserfs, mount, merge there, do what you need, unmount, kill the file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question