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

Commit

Permalink
解决打不开问题
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Oct 12, 2021
1 parent 94bfaaf commit 1790988
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aliyun/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ func GetFilePath(token string, driveId string, parentFileId string, fileId strin
minNum = 1
}
for i := len(list.Items); i > minNum; i-- {
path += list.Items[i-1].Name + "/"
if list.Items[i-1].Type == "folder" {
path += list.Items[i-1].Name + "/"
}
}

cache.GoCache.SetDefault(parentFileId+"path", path)
Expand Down
1 change: 1 addition & 0 deletions aliyun/model/filepath.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package model

type FilePath struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
// created_at: "2021-09-06T07:12:29.103Z"
// domain_id: "bj29"
// drive_id: "1662258"
Expand Down
1 change: 1 addition & 0 deletions webdav/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status
href += "/"
}
}

return mw.write(makePropstatResponse(href, pstats))
}
userAgent := r.Header.Get("User-Agent")
Expand Down

0 comments on commit 1790988

Please sign in to comment.