Skip to content

Commit

Permalink
Fixed error with Copytree preserving dirname
Browse files Browse the repository at this point in the history
Copytree plugin 'preserve_dirname' feature used to not copy any contents,
and copied the wrong directories. This is fixed in this commit.

Signed-off-by: Richard Barella <[email protected]>
  • Loading branch information
ribab committed Jan 26, 2018
1 parent d767f59 commit 0be9517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylib/Utilities/Copytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def execute(self, log, keyvals, testDef):
srcpath = srcpath.strip()
reload(distutils.dir_util)
if cmds['preserve_directory'] != "0":
subdst = os.path.join(dst,os.path.basename(os.path.dirname(srcpath)))
subdst = os.path.join(dst,os.path.basename(srcpath))
if os.path.exists(subdst):
shutil.rmtree(subdst)
os.mkdir(subdst)
Expand Down

0 comments on commit 0be9517

Please sign in to comment.