SpringSource/spring-integration — pull request #773 by garyrussell (2013-03-22 17:03:11+00:00)
Title: INT-2954 (S)FTP Fix AutoCreate Top Level Dir

When autocreateDirectory is true, and the top level directory
did not exist, the mkdirs failed because the adapter tried
to create a directory name with a zero length string.

This caused an 'String index out of range: 0' exception in
SFTP.

Stop iteration when 'pathSegment' is zero length.