diff --git a/lib/net/scp.rb b/lib/net/scp.rb index 5b04d98..5e8afdc 100644 --- a/lib/net/scp.rb +++ b/lib/net/scp.rb @@ -342,6 +342,7 @@ def scp_command(mode, options) # sets up a state machine to use to process the upload or download. # (See Net::SCP::Upload and Net::SCP::Download). def start_command(mode, local, remote, options={}, &callback) + local = local.to_path if local.respond_to?(:to_path) && !local.respond_to?(:to_io) session.open_channel do |channel| if options[:shell]