zhanghai / zhanghai/MaterialFiles
FTP uploading folders with special characters (such as `>`, `:`, etc.) in their names causes "ECONNRESET - Connection reset by peer" and "Page type unknown"
@zhanghai is already working on this.
Since Nov 1, 2024.
- Dominant language
- Kotlin
- Stars
- 9k
- Forks
- 736
- PR merge metrics
- No merged PRs in 30d
Description
Hi !
With the latest version available in f-droid (1.7.4) on Android 14, I've been trying to upload a bunch of music album folders but they end up causing a bunch of incomprehensible errors in Nautilus and FileZilla when they try to copy the actual files in those folders, when the folder names have characters such as : or > in them.
The weird thing is that in the Material Files interface, and through FTP, it is quite possible to create, rename, view such folders even with special characters. It only fails to upload files to them.
For example, if I create a folder called blah : in the Music folder, and try to upload to it, for each file FileZilla reports:
Could not read from transfer socket: ECONNRESET - Connection reset by peer
Nautilus / GVFS reports:
There was an error copying the file into
ftp://admin@the_phone:2121/Music/blah%20:.Error sending data: Connection reset by peer
If you try to create a file in such a folder (instead of just copying), Nautilus' error is slightly different:
There was an error creating the directory in
ftp://admin@the_phone:2121/Music/blah%20:.Page type unknown
Given that two different types of FTP clients are choking on this in different ways, I am wondering if there is something Material Files can do to translate the paths+filenames when receiving (or creating, modifying etc.) files through FTP specifically? Otherwise, is there a way for Material Files to raise a more descriptive error for the FTP clients? Or prevent the creation of those faulty folders (instead of later failing on the files within)?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.