mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +08:00
chore: change size of file to int64
This commit is contained in:
parent
c3040fdfc3
commit
fd5c3e831d
@ -122,7 +122,7 @@ func (m *Monitor) Complete() error {
|
||||
Name: fmt.Sprintf("transfer %s to %s", file.Path, m.dstDirPath),
|
||||
Func: func(tsk *task.Task[uint64]) error {
|
||||
defer wg.Done()
|
||||
size, _ := strconv.ParseUint(file.Length, 10, 64)
|
||||
size, _ := strconv.ParseInt(file.Length, 10, 64)
|
||||
mimetype := mime.TypeByExtension(path.Ext(file.Path))
|
||||
if mimetype == "" {
|
||||
mimetype = "application/octet-stream"
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type Obj interface {
|
||||
GetSize() uint64
|
||||
GetSize() int64
|
||||
GetName() string
|
||||
ModTime() time.Time
|
||||
IsDir() bool
|
||||
|
@ -5,7 +5,7 @@ import "time"
|
||||
type Object struct {
|
||||
ID string
|
||||
Name string
|
||||
Size uint64
|
||||
Size int64
|
||||
Modified time.Time
|
||||
IsFolder bool
|
||||
}
|
||||
@ -14,7 +14,7 @@ func (f Object) GetName() string {
|
||||
return f.Name
|
||||
}
|
||||
|
||||
func (f Object) GetSize() uint64 {
|
||||
func (f Object) GetSize() int64 {
|
||||
return f.Size
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user