Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
指定int为int64
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Oct 18, 2021
1 parent e882c15 commit 0cafbd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aliyun/model/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type ListModel struct {
MimeType string `json:"mime_type"`
MimeExtension string `json:"mime_extension"`
Hidden bool `json:"hidden"`
Size int `json:"size"`
Size int64 `json:"size"`
Category string `json:"category"`
DownloadUrl string `json:"download_url"`
Url string `json:"url"`
Expand Down
2 changes: 1 addition & 1 deletion webdav/prop.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func findDisplayName(ctx context.Context, fs FileSystem, ls LockSystem, fi model
}

func findContentLength(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
return strconv.Itoa(fi.Size), nil
return strconv.FormatInt(fi.Size, 10), nil
}

func findLastModified(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion webdav/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta

if len(rangeStr) > 0 && strings.LastIndex(rangeStr, "-") > 0 {
rangeArr := strings.Split(rangeStr, "-")
rangEnd, _ := strconv.Atoi(rangeArr[1])
rangEnd, _ := strconv.ParseInt(rangeArr[1], 10, 64)
if rangEnd >= fi.Size {
rangeStr = rangeStr[:strings.LastIndex(rangeStr, "-")+1]
}
Expand Down

0 comments on commit 0cafbd5

Please sign in to comment.