When using sftp.upload to upload a directory recursively, an exception is thrown if the destination directory(s) already exist.
Patched (only in my private copy) sftp/operations/upload.rb lines 162 and 302 to append:
|| response.code == 4 # where 4 appears to be the response code for: target directory already exists
This takes care of the problem, but I don't know the code base well enough to know if it should be done differently.
I.m using net-sftp gem v 2.0.5 on Windows. The gem was a fresh install yesterday.
Should this be handled differently? Or can someone appropriate please add these changes to the gem?
Thanks for the report. The project is in maintenance mode but I'm happy to pull in a patch.