Fix download 404 error

This commit is contained in:
Aurélie Delhaie
2022-06-07 23:23:14 +02:00
parent 125bb7e2e5
commit 497c3e434a

View File

@@ -207,7 +207,7 @@ func Download(w http.ResponseWriter, r *http.Request) {
log.Println(err) log.Println(err)
return return
} }
savePath := filepath.Join(config.Path().Storage, game.PathStorage) savePath := filepath.Join(config.Path().Storage, strconv.Itoa(userId), game.PathStorage)
if _, err := os.Stat(savePath); err == nil { if _, err := os.Stat(savePath); err == nil {
file, err := os.Open(savePath) file, err := os.Open(savePath)