mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
file_copy: Properly apply file permissions
When dst was a directory, the file would be copied properly, but the permissions would be applied to the parent directory rather than the copied file.
This commit is contained in:
parent
9caf94ee42
commit
9f7038163f
1 changed files with 6 additions and 1 deletions
|
@ -69,4 +69,9 @@ class FileCopyCommand(Task):
|
|||
else:
|
||||
shutil.copytree(src_path, final_destination)
|
||||
|
||||
modify_path(info, file_entry['dst'], file_entry)
|
||||
if os.path.isfile(src_path) and os.path.isdir(final_destination):
|
||||
dst = os.path.join(final_destination, os.path.basename(src_path))
|
||||
else:
|
||||
dst = final_destination
|
||||
|
||||
modify_path(info, dst, file_entry)
|
||||
|
|
Loading…
Add table
Reference in a new issue