• Michael Taufen's avatar
    Fix a potential file leak · 62fecfb0
    Michael Taufen authored
    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.
    62fecfb0
filesystem.go 1.55 KB