fix: error variable shadowing problem

This commit is contained in:
이광오 2023-07-30 18:46:34 +09:00
parent adf24fdcaa
commit 5bc70569ae

View File

@ -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
}
}