mirror of
https://github.com/minio/minio.git
synced 2025-04-25 20:43:17 -04:00
DonutfileWriter should return value of file.Close()
This commit is contained in:
parent
ab89298250
commit
4b9fbd3b3a
@ -327,23 +327,19 @@ func (d donutFileWriter) Close() error {
|
|||||||
if d.err != nil {
|
if d.err != nil {
|
||||||
return d.err
|
return d.err
|
||||||
}
|
}
|
||||||
|
|
||||||
d.file.Close()
|
|
||||||
|
|
||||||
metadata, _ := json.Marshal(d.metadata)
|
metadata, _ := json.Marshal(d.metadata)
|
||||||
ioutil.WriteFile(path.Join(d.root, "metadata.json"), metadata, 0600)
|
ioutil.WriteFile(path.Join(d.root, "metadata.json"), metadata, 0600)
|
||||||
donutMetadata, _ := json.Marshal(d.donutMetadata)
|
donutMetadata, _ := json.Marshal(d.donutMetadata)
|
||||||
ioutil.WriteFile(path.Join(d.root, "donutMetadata.json"), donutMetadata, 0600)
|
ioutil.WriteFile(path.Join(d.root, "donutMetadata.json"), donutMetadata, 0600)
|
||||||
|
|
||||||
return nil
|
return d.file.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d donutFileWriter) CloseWithError(err error) error {
|
func (d donutFileWriter) CloseWithError(err error) error {
|
||||||
if d.err != nil {
|
if d.err != nil {
|
||||||
d.err = err
|
d.err = err
|
||||||
}
|
}
|
||||||
d.file.Close()
|
return d.Close()
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d donutFileWriter) SetMetadata(metadata map[string]string) error {
|
func (d donutFileWriter) SetMetadata(metadata map[string]string) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user