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

Commit

Permalink
Merge pull request #32 from topcheer/master
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
LinkLeong committed Dec 17, 2021
2 parents 27e7067 + 103298e commit 315daef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions aliyun/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func GetList(token string, driveId string, parentFileId string, marker ...string
postData["fields"] = "*"
postData["order_by"] = "updated_at"
postData["order_direction"] = "DESC"
//add marker post data
if len(marker) > 0 {
postData["marker"] = marker[0]
}

data, err := json.Marshal(postData)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion webdav/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status
if len(list.Items) == 0 {
fi = aliyun.GetFileDetail(h.Config.Token, h.Config.DriveId, value)
} else {
list, err = aliyun.GetList(h.Config.Token, h.Config.DriveId, "")
//bugfix: use new local scope variable
list, _ := aliyun.GetList(h.Config.Token, h.Config.DriveId, "")
fi, _ = findUrl(strArr, h.Config.Token, h.Config.DriveId, list)
}
}
Expand Down

0 comments on commit 315daef

Please sign in to comment.