fix(fileutil): explicitly ignore Close() error on directory file descriptor
This commit is contained in:
parent
df753aaebf
commit
d2156a982c
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ func WriteFileAtomic(path string, data []byte, perm os.FileMode) error {
|
||||||
// This prevents the renamed file from disappearing after a crash
|
// This prevents the renamed file from disappearing after a crash
|
||||||
if dirFile, err := os.Open(dir); err == nil {
|
if dirFile, err := os.Open(dir); err == nil {
|
||||||
_ = dirFile.Sync()
|
_ = dirFile.Sync()
|
||||||
dirFile.Close()
|
_ = dirFile.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Success: skip cleanup (file was renamed, no temp to remove)
|
// Success: skip cleanup (file was renamed, no temp to remove)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue