remove leftover dir creation

This commit is contained in:
Up 2024-05-07 22:39:21 +02:00
parent b463a64003
commit d39d2d4e7f
No known key found for this signature in database
GPG Key ID: 3B75CD7439FEB388

View File

@ -20,7 +20,6 @@ package savedata
import ( import (
"fmt" "fmt"
"log" "log"
"os"
"strconv" "strconv"
"github.com/klauspost/compress/zstd" "github.com/klauspost/compress/zstd"
@ -37,12 +36,6 @@ func Update(uuid []byte, slot int, save any) error {
log.Print("failed to update account last activity") log.Print("failed to update account last activity")
} }
// ideally should have been done at account creation
err = os.MkdirAll(fmt.Sprintf("userdata/%x", uuid), 0755)
if err != nil && !os.IsExist(err) {
return fmt.Errorf(fmt.Sprintf("failed to create userdata folder: %s", err))
}
switch save := save.(type) { switch save := save.(type) {
case defs.SystemSaveData: // System case defs.SystemSaveData: // System
if save.TrainerId == 0 && save.SecretId == 0 { if save.TrainerId == 0 && save.SecretId == 0 {