Use RemoveAll to remove a non-empty directory

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
pull/8707/head
Li Zhijian 4 years ago
parent cccc2867ea
commit d9ad9153c8

@ -310,7 +310,7 @@ func TestLoadInvalidArchive(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer os.Remove(tmpdir)
defer os.RemoveAll(tmpdir)
writeTar := func(filename, internalPath string, body []byte) {
dest, err := os.Create(filename)

Loading…
Cancel
Save