mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target/ssh: Fix improper use of os.path.basename()
os.path.basename() can give surprising results on folder names: os.path.basename('/foo/') == '' os.path.basename(os.path.normpath('/foo/')) == 'foo'
This commit is contained in:
parent
2129d85422
commit
0c72763d2a
@ -464,7 +464,7 @@ class SshConnection(SshConnectionBase):
|
||||
# inside the destination folder, rather than merging the trees.
|
||||
dst = os.path.join(
|
||||
dst,
|
||||
os.path.basename(src),
|
||||
os.path.basename(os.path.normpath(src)),
|
||||
)
|
||||
return cls._push_folder_internal(sftp, src, dst)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user