Fix TestHealStartNStatusHandler sporadic failure (#6015)

Fixes #5818
This commit is contained in:
Harshavardhana 2018-06-12 16:36:31 -07:00 committed by kannappanr
parent 9f4c120731
commit cb9ee1584a

View file

@ -135,10 +135,10 @@ func getValidPath(path string) (string, error) {
if err != nil {
return path, err
}
defer os.Remove(pathJoin(path, ".writable-check.tmp"))
file.Close()
err = os.Remove(pathJoin(path, ".writable-check.tmp"))
return path, err
return path, nil
}
// isDirEmpty - returns whether given directory is empty or not.