mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 20:29:54 -06:00
fix update branch
This commit is contained in:
2
go.sum
2
go.sum
@@ -767,6 +767,8 @@ github.com/mennanov/fieldmask-utils v0.4.0 h1:MvXJgV4em1j0u2Aw2Wwd/ES8alZE9vN5FS
|
||||
github.com/mennanov/fieldmask-utils v0.4.0/go.mod h1:lah2lHczE2ff+7SqnNKpB+YzaO7M3h5iNO4LgPTJheM=
|
||||
github.com/micbar/reva v1.9.1-0.20211014111217-0edd79fd6531 h1:8ArBLoRSC94F6jvPx97TprxTMJ310+JiyqMm9RtPy7o=
|
||||
github.com/micbar/reva v1.9.1-0.20211014111217-0edd79fd6531/go.mod h1:uENdZEtDFmTRt6+d4+Ro4P5XnNL+9I6gwftHEBJzHQw=
|
||||
github.com/micbar/reva v1.9.1-0.20211014134834-c5ca8080f587 h1:/SfB2iKBzK7yQrK7bBoTHfUCHY+FB9AoVSOoErXTXo4=
|
||||
github.com/micbar/reva v1.9.1-0.20211014134834-c5ca8080f587/go.mod h1:uENdZEtDFmTRt6+d4+Ro4P5XnNL+9I6gwftHEBJzHQw=
|
||||
github.com/micro/cli/v2 v2.1.2/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
|
||||
@@ -451,3 +451,21 @@ func (g Graph) getDriveQuota(ctx context.Context, space *storageprovider.Storage
|
||||
|
||||
return qta, nil
|
||||
}
|
||||
|
||||
func getQuota(quota *msgraph.Quota, defaultQuota string) *provider.Quota {
|
||||
switch {
|
||||
case quota != nil && quota.Total != nil:
|
||||
if q := *quota.Total; q >= 0 {
|
||||
return &provider.Quota{QuotaMaxBytes: uint64(q)}
|
||||
}
|
||||
fallthrough
|
||||
case defaultQuota != "":
|
||||
if q, err := strconv.ParseInt(defaultQuota, 10, 64); err == nil && q >= 0 {
|
||||
return &provider.Quota{QuotaMaxBytes: uint64(q)}
|
||||
}
|
||||
fallthrough
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user