ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
47 stars 78 forks source link

Target.pull: use_scp=True does not respect the "cp" behavior #559

Closed douglas-raillard-arm closed 3 years ago

douglas-raillard-arm commented 3 years ago

Connections push/pull are expected to follow the same behavior as the cp command, which is not the case when using use_scp=True on an ssh connection:

EDIT: THIS IS CURRENTLY DANGEROUS, DO NOT RUN (it will attempt to shutil.rmtree the current folder when using sftp. Solved by https://github.com/ARM-software/devlib/pull/560)

# This will fail with a PermissionError
target.pull('/path/to/file/', '.')

EDIT: This only fails if the destination already exists.