lib/vagrant/scp/commands/scp.rb in vagrant-scp-0.5.0 vs lib/vagrant/scp/commands/scp.rb in vagrant-scp-0.5.1

- old
+ new

@@ -44,11 +44,11 @@ return nil, nil end def host host = [@file_1, @file_2].map{|file_spec| file_spec.match(/^([^:]*):/)[1] rescue nil}.compact.first - host = 'default' if (host.nil? || host == 0 ) + host = nil if (host.nil? || host == 0 ) host end def net_ssh_command @file_1.include?(':') ? :download! : :upload! @@ -61,10 +61,10 @@ def target_files format_file_path(@file_2) end def format_file_path(filepath) - if @file_1.include?(':') + if filepath.include?(':') filepath.split(':').last.gsub("~", "/home/#{@ssh_info[:username]}") else filepath end end