mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
xl/fs: Make i/o operations atomic. (#1496)
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
17868ccd7f
commit
5133ea50bd
@@ -70,9 +70,8 @@ func (f *File) Close() error {
|
||||
// error if any.
|
||||
func (f *File) CloseAndRemove() error {
|
||||
// close the embedded fd
|
||||
if err := f.File.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
f.File.Close()
|
||||
|
||||
// Remove the temp file.
|
||||
if err := os.Remove(f.Name()); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user