mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-14 14:37:09 +08:00
rtemstoolkit/path: Add support to copy single file
This commit is contained in:

committed by
Chris Johns

parent
29ad0ec7a8
commit
2852cac71a
@@ -314,8 +314,12 @@ def copy_tree(src, dst):
|
||||
hsrc = host(src)
|
||||
hdst = host(dst)
|
||||
|
||||
if exists(src):
|
||||
names = listdir(src)
|
||||
if exists(hsrc):
|
||||
if isdir(hsrc):
|
||||
names = listdir(hsrc)
|
||||
else:
|
||||
names = [basename(hsrc)]
|
||||
hsrc = dirname(hsrc)
|
||||
else:
|
||||
names = []
|
||||
|
||||
|
Reference in New Issue
Block a user