sync call to write file, avoid vif loading error

fix https://github.com/chrislusf/seaweedfs/issues/2633
This commit is contained in:
chrislu
2022-02-04 11:14:04 -08:00
parent d8e6bd0a94
commit 76e297d64f
2 changed files with 18 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ func SaveVolumeInfo(fileName string, volumeInfo *volume_server_pb.VolumeInfo) er
return fmt.Errorf("marshal to %s: %v", fileName, marshalErr)
}
writeErr := os.WriteFile(fileName, []byte(text), 0755)
writeErr := util.WriteFile(fileName, []byte(text), 0755)
if writeErr != nil {
return fmt.Errorf("fail to write %s : %v", fileName, writeErr)
}