zachpendleton/ftp-ext — Issue #1: File Exists errors
Author: farviewsoft
Created: 2012-02-03 17:59:12+00:00
State: open

I'm intermittently getting a 'File Exists' error in my logs for code that uses the 'put_dir' method:

550 /VOLUME1/WWW/[path to directory]: File exists
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:243:in `getresp'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:264:in `sendcmd'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:262:in `sendcmd'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:711:in `mkdir'
/Library/Ruby/Gems/1.8/gems/ftp-ext-0.1.4/lib/ftp-ext.rb:34:in `put_dir'
/Library/Ruby/Gems/1.8/gems/ftp-ext-0.1.4/lib/ftp-ext.rb:30:in `times'
/Library/Ruby/Gems/1.8/gems/ftp-ext-0.1.4/lib/ftp-ext.rb:30:in `put_dir'
...
[The rest of the stack trace goes back to the method that called 'put_dir']

When I go to check on the file that was uploaded as part of this error message, the file is present. Which would say to me that there's an error trap on the directory creation code missing. I briefly looked at the gem code and couldn't work out what what going on because it doesn't happen consistently.