mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
SFTP: respect file open flags also for file creation
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -93,7 +93,7 @@ func (*OsFs) Create(name string, flag int) (File, *PipeWriter, func(), error) {
|
||||
if flag == 0 {
|
||||
f, err = os.Create(name)
|
||||
} else {
|
||||
f, err = os.OpenFile(name, flag, os.ModePerm)
|
||||
f, err = os.OpenFile(name, flag, 0666)
|
||||
}
|
||||
return f, nil, nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user