summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Kumar Banerjee <vijaykumar9597@gmail.com>2018-11-07 13:11:09 +0530
committerChris Johns <chrisj@rtems.org>2018-11-17 12:31:45 +1100
commitf9a17cd2a1ba3a03bc167ccd91202698e9d86e5e (patch)
tree8ed3f141849000e0ac1c4d11ef4fc8d6450553c1
parentCoverage: add the style and js files to the symbol-set report directory (diff)
downloadrtems-tools-f9a17cd2a1ba3a03bc167ccd91202698e9d86e5e.tar.bz2
rtemstoolkit/path : Add support to copy single files
-rw-r--r--rtemstoolkit/path.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/rtemstoolkit/path.py b/rtemstoolkit/path.py
index 760f4bd..83fb361 100644
--- a/rtemstoolkit/path.py
+++ b/rtemstoolkit/path.py
@@ -191,10 +191,11 @@ def copy_tree(src, dst):
hsrc = host(src)
hdst = host(dst)
- if os.path.exists(src):
+ if os.path.exists(src) and os.path.isdir(src):
names = os.listdir(src)
else:
- name = []
+ names = [basename(src)]
+ src = dirname(src)
if not os.path.isdir(dst):
os.makedirs(dst)