embeddedmz / ftpclient-cpp

C++ client for making FTP requests
MIT License
211 stars 67 forks source link

Fix folders with spaces not working #35

Closed Knucklesfan closed 2 years ago

Knucklesfan commented 2 years ago

During my testing of this library, I was trying to merge an FTP server that had a folder with a space in it. I figured out this was an issue with the URL parser, and I was able to fix it. Thanks for the great library, having a blast using it!

Knucklesfan commented 2 years ago

I'd like to mention, I've only tested this change on Arch Linux, so I am unaware of its effects on Windows or MacOS. Shouldn't be too big of a deal though, right?

embeddedmz commented 2 years ago

Hi @Knucklesfan

I will do a test under Windows and come back to you.

embeddedmz commented 2 years ago

You're right ! I ran unit tests with "remote_file" (key of the INI file that is parsed by the unit test program) set to a file name having spaces and existing in the FTP server (Cerberus FTP server for FTP and Rebex Tiny SFTP Server for SFTP on a Windows 10 machine, I don't use FileZilla since some FTP operations can fail from time to time) and the download failed ! After using your fix, the unit tests succeeded.

Thank you !