🐛 fix lanzou webdav time error

pull/548/head
微凉 2021-12-01 00:15:34 +08:00
parent cd50227835
commit bd91acc5d0
1 changed files with 9 additions and 6 deletions

View File

@ -10,6 +10,7 @@ import (
"path/filepath"
"regexp"
"strconv"
"time"
)
var lanzouClient = resty.New()
@ -25,12 +26,14 @@ type LanZouFile struct {
}
func (driver *Lanzou) FormatFile(file *LanZouFile) *model.File {
now := time.Now()
f := &model.File{
Id: file.Id,
Name: file.Name,
Driver: driver.Config().Name,
SizeStr: file.Size,
TimeStr: file.Time,
UpdatedAt: &now,
}
if file.Folder {
f.Type = conf.FOLDER