diff --git a/plugins/pushes/ftp/adapter.rb b/plugins/pushes/ftp/adapter.rb index b4c4f48f2..d0d076491 100644 --- a/plugins/pushes/ftp/adapter.rb +++ b/plugins/pushes/ftp/adapter.rb @@ -74,7 +74,7 @@ module VagrantPlugins # Create the parent directories if they does not exist (naive mkdir -p) fullpath.descend do |path| - unless check_dir_exists? path.to_s + if !directory_exists?(path.to_s) @server.mkdir(path.to_s) end end @@ -83,7 +83,7 @@ module VagrantPlugins @server.putbinaryfile(local, remote) end - def check_dir_exists?(path) + def directory_exists?(path) begin @server.chdir(path) return true