From 09dfaf00fa2d2771f1d788f5d1bccf853bed0d0e Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 18 Sep 2022 21:05:51 -0700 Subject: [PATCH] mkdir -p but for real --- shared/testutils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/testutils.go b/shared/testutils.go index ebbb54f..7c354af 100644 --- a/shared/testutils.go +++ b/shared/testutils.go @@ -84,7 +84,7 @@ func BackupAndRestoreWithId(t *testing.T, id string) func() { func touchFile(p string) { _, err := os.Stat(p) if os.IsNotExist(err) { - checkError(os.MkdirAll(filepath.Base(p), os.ModePerm)) + checkError(os.MkdirAll(filepath.Dir(p), os.ModePerm)) file, err := os.Create(p) checkError(err) defer file.Close()