mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: minor fixes 20230313
This commit is contained in:
@@ -29,7 +29,10 @@ func ZeroFile(filename string) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "os.OpenFile")
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() {
|
||||
f.Sync()
|
||||
f.Close()
|
||||
}()
|
||||
|
||||
info, err := f.Stat()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user