mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: fix misuse of package path instead of filepath.path (#2684)
As stated by https://pkg.go.dev/path, "path" is mainly for URLs, "path.filepath" for file systems
This commit is contained in:
@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"unicode/utf16"
|
||||
|
||||
@ -85,7 +85,7 @@ func (t *TelegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
|
||||
// Fill the common field of create
|
||||
create := store.Resource{
|
||||
CreatorID: creatorID,
|
||||
Filename: path.Base(attachment.FileName),
|
||||
Filename: filepath.Base(attachment.FileName),
|
||||
Type: attachment.GetMimeType(),
|
||||
Size: attachment.FileSize,
|
||||
MemoID: &memoMessage.ID,
|
||||
|
Reference in New Issue
Block a user