From bc8f5f7d689f60134c4678da49f7522317871df7 Mon Sep 17 00:00:00 2001 From: Tomachi <8929706+book000@users.noreply.github.com> Date: Thu, 14 Nov 2024 01:16:33 +0900 Subject: [PATCH] Update cmd/splashscreen-changer/config_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cmd/splashscreen-changer/config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/splashscreen-changer/config_test.go b/cmd/splashscreen-changer/config_test.go index 343ba29..f9fab15 100644 --- a/cmd/splashscreen-changer/config_test.go +++ b/cmd/splashscreen-changer/config_test.go @@ -12,7 +12,7 @@ func TestLoadConfig(t *testing.T) { tmpDir := os.TempDir() sourceDirPath := filepath.Join(tmpDir, "source") if err := os.MkdirAll(sourceDirPath, os.ModePerm); err != nil { t.Fatalf("Failed to create source directory: %v", err) } - defer os.RemoveAll(sourceDirPath) + defer func() { if err := os.RemoveAll(sourceDirPath); err != nil { t.Errorf("Failed to remove source directory: %v", err) } }() destinationDirPath := filepath.Join(tmpDir, "destination") if err := os.MkdirAll(filepath.Join(destinationDirPath, "EasyAntiCheat"), os.ModePerm); err != nil { t.Fatalf("Failed to create destination directory: %v", err) } defer os.RemoveAll(destinationDirPath)