Fix function name and update file path handling
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-04-05 18:07:00 +02:00
parent 3ac6b02e56
commit 09892709ec
3 changed files with 7 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package meowlib
import (
"errors"
"os"
"path/filepath"
"github.com/google/uuid"
)
@ -30,7 +31,7 @@ func (msg *UserMessage) AddFile(filename string, maxMessageSize int64) error {
}
var file File
file.Filename = filename
file.Filename = filepath.Base(filename)
file.Size = uint64(fi.Size())
file.Data = data
msg.Files = append(msg.Files, &file)