simplify removing temporary files (#10389)

This commit is contained in:
Harshavardhana
2020-08-31 12:35:40 -07:00
committed by GitHub
parent cb61e50b51
commit 102ad60dee
3 changed files with 15 additions and 18 deletions
+2 -3
View File
@@ -41,9 +41,8 @@ func fsRemoveFile(ctx context.Context, filePath string) (err error) {
return err
}
if err = os.Remove((filePath)); err != nil {
err = osErrToFileErr(err)
if err != errFileNotFound {
if err = os.Remove(filePath); err != nil {
if err = osErrToFileErr(err); err != errFileNotFound {
logger.LogIf(ctx, err)
}
}