Giter Site home page Giter Site logo

Comments (6)

picrap avatar picrap commented on July 26, 2024

OK, I'm installing a FileZilla server to see all this. I'll let you know.

from ftp.

picrap avatar picrap commented on July 26, 2024

I took a look at FileZilla server, and news are not good.

  • FileZilla server apparently does not support name escaping at all.
  • There are two ways to make it work right now:
    • Implement the MLSD command (this is better anyway)
    • Use raw "CWD" / "LIST" (or possibly "STAT", I did not try) to get a directory listing.
      I create a ticket right now to implement MLSD command.

from ftp.

Eleasar avatar Eleasar commented on July 26, 2024

wow - thanks for your fast tests and response!

To be consistent you may want to change the "ProcessGetEntry" to use the "Stat" method (right now it misses the escaping).

Also it would help if the methods would be virtual so some custom adjustments can be implemented.

from ftp.

picrap avatar picrap commented on July 26, 2024

I committed a change with the EscapePath in ProcessGetEntry. A NuGet package (version 1.3) should be available in the next few minutes with this. I also added a FtpPlatform class where directory parsing and path escaping are processed.
So this is not virtual as you expected, because I was too lazy to do this. However if you explain a little what you want to do exactly, I'd be happy to discuss it with you.

from ftp.

Eleasar avatar Eleasar commented on July 26, 2024

Will test it (soon) - thanks! Looks great.

As for virtual it was due to not being able to extend for some special behavior. I only tested now with filezilla which tells it is unix but in fact seems to support a few things from unix but for the rest depends on the underlying windows. So if there is another place to handle some special stuff it would be easy to inherit from FtpClient, handle some strange edge cases then in custom code. Or have some strategy patterns like the FtpPlatform one or callbacks in place to alter behavior for servers that do not behave correctly (maybe returning some unexpected status codes or such).

But this change solves already my issue so nothing too important for me.

from ftp.

picrap avatar picrap commented on July 26, 2024

FtpClient is actually a high-level wrapper for low-level commands (I found no other ftp client for doing both high-level and low-level commands, this is why I wrote this one), so you can easily implement your own commands as new methods (and inherited from FtpClient or FtpClientCore).
I close this issue, but the MLST/MLSD stays open, of course.
If you want, you can also fork the project, make your changes and submit them as a pull request.

from ftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.