こんにちは #1

Merged
merged 1 commit into from Apr 12, 2012
View
@@ -131,7 +131,13 @@ def upload_folder(dir, ftp)
def sync_folder(local_dir, remote_dir, ftp)
Dir.chdir local_dir
- ftp.chdir remote_dir
+ begin
+ ftp.chdir remote_dir
+ rescue
+ # if the remote dir doesn't exist, we create it
+ ftp.mkdir remote_dir
+ ftp.chdir remote_dir
+ end
put_title "process folder: #{Dir.pwd}"