ArxOne / FTP

Simple FTP client
MIT License
37 stars 15 forks source link

Folder name issue #6

Closed Nirad closed 9 years ago

Nirad commented 9 years ago

i unable to figure out why am not able to open this style of folder name or any folder with space in it /\Fun/Films/Bla Bla Vol. 1 et 2 (2003-2004) MULTi-Work [WORK] XCOM-FunFor

Server is unix

Nirad commented 9 years ago

pieces of code

ftpClient.ListEntries("/\Fun/Films/Bla Bla Vol. 1 et 2 (2003-2004) MULTi-Work [WORK] XCOM-FunFor")

Nirad commented 9 years ago

that is my workin solution

                    tempPath = tempPath.Replace(" ", @"\ ");
                    tempPath = tempPath.Replace("[", @"\[");
                    tempPath = tempPath.Replace("]", @"\]");
                    tempPath = tempPath.Replace("(", @"\(");
                    tempPath = tempPath.Replace(")", @"\)");
picrap commented 9 years ago

I made a fix in release 1.2.4. From my tests, only spaces needed to be fixed. In your sample there is a backslash. It this normal? Let me know if it's now OK.

Nirad commented 9 years ago

I confirm the spaces work well, but other special characters not. Fillezila works well on the same FTP server. I will continue my testing on another server. Thank you for your very quick response. tested ver. 1.2.4

Nirad commented 9 years ago

For the backslash I use FtpEntry -> FtpPath entity and this is the way it gives me

Nirad commented 9 years ago

/Name/file test.txt = ok /[Name]/file test.txt = fail

picrap commented 9 years ago

I have made a blind fix, released in version 1.2.5... Let me know :wink:

Nirad commented 9 years ago

Your blind fix works everything is ok for me. Thx

picrap commented 9 years ago

A lucky guess, then :smile:

Eleasar commented 9 years ago

i think this fix was not consistentyl applied. In the ftp client "Stat" method it is used. Method "ProcessGetEntry" does not use it though. At least filezilla server does not work for folder containing spaces (server type tells unix emulated by filezilla).

But otherwise really a great library!

picrap commented 9 years ago

This is discussed in https://github.com/ArxOne/FTP/issues/7, so I keep this issue closed.