FTPClient.jl icon indicating copy to clipboard operation
FTPClient.jl copied to clipboard

`cd` is broken (due the trailing slash)

Open sylvaticus opened this issue 2 years ago • 0 comments

The trailing slash adjustment for ftp.ctrl.url in ftp_command for the specific "CD" command is still broken:

Using absolute path:

julia> ftp = FTP(hostname = "palantir.boku.ac.at", username = "anonymous", password = "")
URL:       ftp://[email protected]/
Transfer:  passive mode
Security:  none

julia> cd(ftp,"/Public")     # cd using abs path

julia> println(ftp.ctxt.url) # ok
ftp://[email protected]//Public/

julia> cd(ftp,"/")           # wishing to go back to the remote server root

julia> println(ftp.ctxt.url) # not going back to the root !
ftp://[email protected]//Public//

Using relative path:

julia> ftp = FTP(hostname = "palantir.boku.ac.at", username = "anonymous", password = "")
URL:       ftp://[email protected]/
Transfer:  passive mode
Security:  none

julia> cd(ftp,"Public")      # cd using relative path

julia> println(ftp.ctxt.url) # no double slash between url and path
ftp://[email protected]/Public/

julia> cd(ftp,"/")           # wishing to go back to the remote server root

julia> println(ftp.ctxt.url) # again, not going back to the root !
ftp://[email protected]/Public//

sylvaticus avatar Jul 13 '23 10:07 sylvaticus