mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
xl/fs: Make i/o operations atomic. (#1496)
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
17868ccd7f
commit
5133ea50bd
+2
-3
@@ -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