Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve original permissions when copying template files. #538

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

gouttegd
Copy link
Contributor

@gouttegd gouttegd commented Feb 8, 2022

When instanciating an ODK repository, copy files from the template using shutil.copy instead of shutil.copyfile. The former has the benefit of preserving the permissions of the source file.

For files that are generated from a Jinja2 template, explicitly transfer the permission bits from the source template to the generated file.

close #196

When instanciating an ODK repository, copy files from the template using
`shutil.copy` instead of `shutil.copyfile`. The former has the benefit
of preserving the permissions of the source file.

For files that are generated from a Jinja2 template, explicitly transfer
the permission bits from the source template to the generated file.

close #196
@gouttegd gouttegd self-assigned this Feb 8, 2022
@gouttegd gouttegd requested a review from matentzn February 8, 2022 21:57
@matentzn matentzn merged commit a356c4d into master Feb 9, 2022
@matentzn matentzn deleted the preserve-template-permissions branch February 9, 2022 09:58
@matentzn
Copy link
Contributor

matentzn commented Feb 9, 2022

This is awesome! Will try it now!

@matentzn
Copy link
Contributor

matentzn commented Feb 9, 2022

Seems to work!

@matentzn matentzn added this to the 1.3.0 milestone Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

./run.sh make syntax missing privileges
2 participants