Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scp.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def putfo(self, fl, remote_path, mode='0644', size=None):
self.close()

def get(self, remote_path, local_path='',
recursive=False, preserve_times=False):
# type: (PathTypes, Union[str, bytes], bool, bool) -> None
recursive=False, preserve_times=False, strict_file_names=False):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it really be enabled by default?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it shouldn't, my mistake.

# type: (PathTypes, Union[str, bytes], bool, bool, bool) -> None
"""
Transfer files and directories from remote host to localhost.

Expand Down Expand Up @@ -270,12 +270,14 @@ def get(self, remote_path, local_path='',
asunicode(self._recv_dir))
rcsv = (b'', b' -r')[recursive]
prsv = (b'', b' -p')[preserve_times]
trsv = (b'', b' -T')[not strict_file_names]
self.channel = self._open()
self._pushed = 0
self.channel.settimeout(self.socket_timeout)
self.channel.exec_command(self.scp_command +
rcsv +
prsv +
trsv +
b" -f " +
b' '.join(remote_path))
self._recv_all()
Expand Down