diff options
Diffstat (limited to 'lib/leap_cli/ssh/backend.rb')
-rw-r--r-- | lib/leap_cli/ssh/backend.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/leap_cli/ssh/backend.rb b/lib/leap_cli/ssh/backend.rb index c1afc993..3894d815 100644 --- a/lib/leap_cli/ssh/backend.rb +++ b/lib/leap_cli/ssh/backend.rb @@ -120,7 +120,12 @@ module LeapCli # def upload!(src, dest, options={}) if options[:mode] - super(StringIO.new(File.read(src)), dest, options) + if src.is_a?(StringIO) + content = src + else + content = StringIO.new(File.read(src)) + end + super(content, dest, options) else super(src, dest, options) end |