mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
create the final file with mode 0666 for multipart-uploads (#9173)
NAS gateway creates non-multipart-uploads with mode 0666. But multipart-uploads are created with a differing mode of 0644. Both modes should be equal! Else it leads to files with different permissions based on its file-size. This patch solves that by using 0666 for both cases.
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
|||||||
|
|
||||||
// AppendFile - appends the file "src" to the file "dst"
|
// AppendFile - appends the file "src" to the file "dst"
|
||||||
func AppendFile(dst string, src string) error {
|
func AppendFile(dst string, src string) error {
|
||||||
appendFile, err := os.OpenFile(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
|
appendFile, err := os.OpenFile(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user