From 5bc70569aec425f0f8df6e678362bc0cf4d9cd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B4=91=EC=98=A4?= Date: Sun, 30 Jul 2023 18:46:34 +0900 Subject: [PATCH] fix: error variable shadowing problem --- http/tus_handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/tus_handlers.go b/http/tus_handlers.go index d8e88d02..a8ae6da1 100644 --- a/http/tus_handlers.go +++ b/http/tus_handlers.go @@ -31,8 +31,8 @@ func tusPostHandler() handleFunc { } dirPath := filepath.Dir(r.URL.Path) - if _, err := d.user.Fs.Stat(dirPath); os.IsNotExist(err) { - if err := d.user.Fs.MkdirAll(dirPath, 0755); err != nil { + if _, statErr := d.user.Fs.Stat(dirPath); os.IsNotExist(statErr) { + if mkdirErr := d.user.Fs.MkdirAll(dirPath, 0755); mkdirErr != nil { return http.StatusInternalServerError, err } }