mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-09 00:26:58 +00:00
Previously, if a write or sync error occurred, we would not have called Close(). This commit refactors ReplaceFile() so that we are sure to call Close(), and also attempts to delete the temporary file if errors occur.