mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
Merge pull request #336 from harshavardhana/pr_out_donutfilewriter_should_return_value_of_file_close_
This commit is contained in:
commit
dcd9a8ae12
@ -327,23 +327,19 @@ func (d donutFileWriter) Close() error {
|
||||
if d.err != nil {
|
||||
return d.err
|
||||
}
|
||||
|
||||
d.file.Close()
|
||||
|
||||
metadata, _ := json.Marshal(d.metadata)
|
||||
ioutil.WriteFile(path.Join(d.root, "metadata.json"), metadata, 0600)
|
||||
donutMetadata, _ := json.Marshal(d.donutMetadata)
|
||||
ioutil.WriteFile(path.Join(d.root, "donutMetadata.json"), donutMetadata, 0600)
|
||||
|
||||
return nil
|
||||
return d.file.Close()
|
||||
}
|
||||
|
||||
func (d donutFileWriter) CloseWithError(err error) error {
|
||||
if d.err != nil {
|
||||
d.err = err
|
||||
}
|
||||
d.file.Close()
|
||||
return nil
|
||||
return d.Close()
|
||||
}
|
||||
|
||||
func (d donutFileWriter) SetMetadata(metadata map[string]string) error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user