resource: convert symlink to real path (#7417)

Fixes #7130

shutil.move expects a source path like "/x/y/" to be a directory and
fails if "/x/y" is a symlink. This invokes realpath on the source
path to avoid the issue.
This commit is contained in:
Levi Baber 2018-03-09 14:40:57 -06:00 committed by scheibelp
parent 9d3d7d3216
commit 38bb0e3e7d

View file

@ -566,7 +566,7 @@ def _add_to_root_stage(self):
'{stage}\n\tdestination : {destination}'.format( '{stage}\n\tdestination : {destination}'.format(
stage=source_path, destination=destination_path stage=source_path, destination=destination_path
)) ))
shutil.move(source_path, destination_path) shutil.move(os.path.realpath(source_path), destination_path)
@pattern.composite(method_list=[ @pattern.composite(method_list=[