Skip to content

Accept Pathname as the local path for upload/download - #85

Merged
mfazekas merged 4 commits into
net-ssh:masterfrom
OskarEichler:codex/normalize-local-paths
Oct 22, 2026
Merged

mfazekas merged 4 commits into
net-ssh:masterfrom
OskarEichler:codex/normalize-local-paths

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Convert a Pathname local to its path string in start_command, so uploads read the file once instead of looping forever and downloads write every chunk instead of keeping only the last one. Only Pathname is converted: File objects also respond to to_path, and they keep being used as IO (same approach as net-sftp #153). Adds upload/download tests for Pathname and File locals and a changelog fragment.

Original fix by @OskarEichler.

Closes #29

OskarEichler and others added 3 commits August 28, 2026 04:52
File objects also respond to to_path, so convert just Pathname to keep
IO objects streamed as-is. Add upload/download tests for Pathname and
File locals, and a changelog fragment.
@mfazekas mfazekas changed the title Treat local path objects as paths while retaining IO behavior Accept Pathname as the local path for upload/download Oct 22, 2026
# Conflicts:
#	test/test_download.rb
#	test/test_upload.rb
@mfazekas
mfazekas merged commit bbb92fe into net-ssh:master Oct 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing in a Pathname object as local for download! fails

2 participants