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

`download` doesn't like spaces in the filename

Open sylvaticus opened this issue 2 years ago • 0 comments

As from the title, the download function doesn't like spaces in the filename :

julia> using FTPClient

julia> ftp_init();

julia> ftp = FTP(hostname = "palantir.boku.ac.at", username = "anonymous", password = "");

julia> download(ftp, "/Public/MODIS_EURO/EU_NPP_2000.tif", "test.tif")
ftp://[email protected]//Public/MODIS_EURO/EU_NPP_2000.tif
IOStream(<file test.tif>)

julia> download(ftp, "/Public/MODIS_EURO/Neumann et al._2016_Creating a Regional MODIS Satellite-Driven Net Primary Production Dataset for European Forests.pdf", "test.pdf")
ftp://[email protected]//Public/MODIS_EURO/Neumann et al._2016_Creating a Regional MODIS Satellite-Driven Net Primary Production Dataset for European Forests.pdf
ERROR: Failed to download /Public/MODIS_EURO/Neumann et al._2016_Creating a Regional MODIS Satellite-Driven Net Primary Production Dataset for European Forests.pdf. :: LibCURL error #3
Stacktrace:
 [1] macro expansion
   @ ~/.julia/dev/FTPClient/src/FTPC.jl:62 [inlined]
 [2] ftp_perform(ctxt::ConnContext{Bool})
   @ FTPClient ~/.julia/dev/FTPClient/src/conn_context.jl:301
 [3] ftp_get(ctxt::ConnContext{Bool}, file_name::String, save_path::String; mode::FTP_MODE)
   @ FTPClient ~/.julia/dev/FTPClient/src/conn_context.jl:155
 [4] download(ftp::FTP, file_name::String, save_path::String; mode::FTP_MODE)
   @ FTPClient ~/.julia/dev/FTPClient/src/FTPObject.jl:118
 [5] download(ftp::FTP, file_name::String, save_path::String)
   @ FTPClient ~/.julia/dev/FTPClient/src/FTPObject.jl:110
 [6] top-level scope
   @ REPL[13]:1

sylvaticus avatar Jul 13 '23 15:07 sylvaticus