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

Set correct permissions for new file #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dbaumgarten
Copy link

Using os.Chmod() applies the correct permissions to the newly created file (without modifications by the umask)
Fixes Issue #35

Using os.Chmod() applies the correct permissions to the newly created file (without modifications by the umask)
apply.go Outdated
@@ -111,6 +111,7 @@ func Apply(update io.Reader, opts Options) error {
if err != nil {
return err
}
os.Chmod(newPath,opts.TargetMode)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code format: need to add space after ,

@dbaumgarten
Copy link
Author

Sorry, I totally forgot about this. Fixed the formatting error.

@chengxuncc
Copy link

LGTM

doitdistributed added a commit to doitdistributed/go-update that referenced this pull request Apr 8, 2021
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.

4 participants