mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
fix: check for bucket existence before FTP upload (#18496)
This commit is contained in:
parent
891c60d83d
commit
d67e4d5b17
@ -290,6 +290,13 @@ func (f *sftpDriver) Filewrite(r *sftp.Request) (w io.WriterAt, err error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ok, err := clnt.BucketExists(r.Context(), bucket)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !ok {
|
||||
return nil, os.ErrNotExist
|
||||
}
|
||||
|
||||
pr, pw := io.Pipe()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user