haiwen / seadroid

Android client for Seafile
Other
540 stars 277 forks source link

"Download failed" when downloading from paths including illegal characters. #985

Closed ToxicMushroom closed 11 months ago

ToxicMushroom commented 1 year ago

Problem When trying to download files containing the colon, or files in folders containing the colon; seafile would throw the not very helpful messages: "Download failed".

Potential solution Perhaps pre-download checking could be done to make sure the user is not trying to download illegally named files/paths. And if they are, show a more friendly error like for example "Illegal character : in path"

Discovery I found this by checking the logcat output when downloading a failing file, which logged a rename warning here: https://github.com/haiwen/seadroid/blob/edd86098b5769a8f6da258fb3337653ec4d68b8d/app/src/main/java/com/seafile/seadroid2/SeafConnection.java#L631C1-L635C14

I didn't immediately find an official list of illegal characters but from what I read it seems to be the same as FAT32 ? https://stackoverflow.com/questions/2679699/what-characters-allowed-in-file-names-on-android

zhwanng commented 1 year ago

Is that so? Screenshot_20230918_100445

ToxicMushroom commented 1 year ago

oops meant colon, not semicolon Ive updated the issue

zhwanng commented 1 year ago

Oh, I also reproduced and got the same test result. we will fix this.

zhwanng commented 11 months ago

This issue has been resolved, please download the latest version.