loudKode / Uptobox-Client

Manage your files/folders in Uptobox.com
15 stars 1 forks source link

Cannot download file if there is non english character in file name #2

Closed alr2413 closed 4 years ago

alr2413 commented 4 years ago

Hi, Thanks for providing this utility. Whenever I try to download a file that has non english characters in its name, the following error occurs:

System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.GetExtension(String path)
   at Uptobox_Client.MainForm.VB$StateMachine_30_MB_Download_Click.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)

Please if you have time, fix this issue.

loudKode commented 4 years ago

i tried to download a non english file located in a non english directory and it works no problem show me exactly the case you facing https://i.postimg.cc/fTGFfT5B/ure-Wiz798.png

alr2413 commented 4 years ago

Thanks. Here is the file URL that I had problem with it: Mp4 file

And this is the screenshot of file: Bug

First, I think that it is because of the existence of non-english characters in file name, but now I'm suspicious of "OR" operand character ( || ) in the file name.

loudKode commented 4 years ago

fixed ..download latest release and test then close the issue if ok those aren't (non-english characters) its illegal characters by windows platform for example:

// The following characters are invalid in a path: // Char Hex Value // ", 0022 // <, 003C // >, 003E // |, 007C // ... // // The following characters are invalid in a filename: // Char Hex Value // ", 0022 // <, 003C // >, 003E // |, 007C // ...

alr2413 commented 4 years ago

Thanks. It now works.