astrails/safe — pull request #38 by akupchanko (2013-10-26 14:08:55+00:00)
Title: Fix cleaning of old files via ftp

We don't need to join the path to filename, received by ftp.nlst(path), because we get full path from ftp
And, as example, instead of removing mysqldump/postfixadmin/mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1443.sql.gz we should remove mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1443.sql.gz

```
Uploading FTP_SERVER:mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1445.sql.gz via FTP
Sending /var/astrails-safe/mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1445.sql.gz to mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1445.sql.gz
...done
listing files: FTP_SERVER:mysqldump/postfixadmin/mysqldump-postfixadmin.*
mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1443.sql.gz
mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1445.sql.gz
mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1444.sql.gz
removing ftp file FTP_SERVER:mysqldump/postfixadmin/mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1443.sql.gz
/usr/lib/ruby/1.9.1/net/ftp.rb:300:in `getresp': 550 mysqldump/postfixadmin/mysqldump/postfixadmin/mysqldump-postfixadmin.131026-1443.sql.gz: No such file or directory (Net::FTPPermError)
from /usr/lib/ruby/1.9.1/net/ftp.rb:325:in `block in sendcmd'
from /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
from /usr/lib/ruby/1.9.1/net/ftp.rb:323:in `sendcmd'
from /usr/lib/ruby/1.9.1/net/ftp.rb:746:in `delete'
........
```