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

Commit

Permalink
update prop.go
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Oct 15, 2021
1 parent 25efe10 commit 0de1110
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions webdav/prop.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ var liveProps = map[xml.Name]struct {
findFn: nil,
dir: false,
},
{Space: "DAV:", Local: "quota-available-bytes"}: {
findFn: quota,
dir: true,
},
{Space: "DAV:", Local: "quota-used-bytes"}: {
findFn: quotaU,
dir: true,
},
// {Space: "DAV:", Local: "quota-available-bytes"}: {
// findFn: quota,
// dir: true,
// },
// {Space: "DAV:", Local: "quota-used-bytes"}: {
// findFn: quotaU,
// dir: true,
// },
{Space: "DAV:", Local: "getcontenttype"}: {
findFn: findContentType,
dir: false,
Expand Down Expand Up @@ -421,18 +421,19 @@ func findLastModified(ctx context.Context, fs FileSystem, ls LockSystem, fi mode
func findCreate(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
return fi.CreatedAt.UTC().Format(http.TimeFormat), nil
}
func quota(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
if fi.Name == "" {
return "1056194496917", nil
}
return "", nil
}
func quotaU(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
if fi.Name == "" {
return "60497000043", nil
}
return "", nil
}

// func quota(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
// if fi.Name == "" {
// return "1056194496917", nil
// }
// return "", nil
// }
// func quotaU(ctx context.Context, fs FileSystem, ls LockSystem, fi model.ListModel) (string, error) {
// if fi.Name == "" {
// return "60497000043", nil
// }
// return "", nil
// }

// ErrNotImplemented should be returned by optional interfaces if they
// want the original implementation to be used.
Expand Down

0 comments on commit 0de1110

Please sign in to comment.