-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixed permission issues on client #1960
Conversation
destDir := filepath.Join(taskdir, dest) | ||
if err := os.MkdirAll(destDir, s.Mode().Perm()); err != nil { | ||
return fmt.Errorf("Couldn't create destination directory %v: %v", destDir, err) | ||
// Create destination directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the comment above or leave a blank line in-between
if err := os.MkdirAll(destDir, s.Mode().Perm()); err != nil { | ||
return fmt.Errorf("Couldn't create destination directory %v: %v", destDir, err) | ||
if err := d.createDir(taskdir, filepath.Dir(dest)); err != nil { | ||
return fmt.Errorf("Couldn't create destination directory 11 %v: %v", dest, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directory 11?
return fmt.Errorf("Couldn't create destination directory %v: %v", destDir, err) | ||
// Create destination directory. | ||
if err := d.createDir(taskdir, dest); err != nil { | ||
return fmt.Errorf("Couldn't create destination directory 22 %v: %v", destDir, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22
if err != nil { | ||
return err | ||
} | ||
for i := len(filePerms) - 1; i >= 0; i-- { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment why you are going backwards
Perm os.FileMode | ||
} | ||
|
||
// splitPath stats each subdirectory of a path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order that is returned?
var mode os.FileMode | ||
i, err := os.Stat(path) | ||
if err != nil { | ||
mode = os.ModePerm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment what this is doing
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #1916