From af0914103d1b1a08e9ebad0c3de3f5ff7668b28a Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 18 Apr 2023 13:25:08 -0700 Subject: [PATCH] Expose a Default Limit version of VerifyorResumeDownload --- functionality/filesharing/filesharing_functionality.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functionality/filesharing/filesharing_functionality.go b/functionality/filesharing/filesharing_functionality.go index c1d7e76..fa5aa9c 100644 --- a/functionality/filesharing/filesharing_functionality.go +++ b/functionality/filesharing/filesharing_functionality.go @@ -181,6 +181,10 @@ func (om *OverlayMessage) ShouldAutoDL() bool { return false } +func (f *Functionality) VerifyOrResumeDownloadDefaultLimit(profile peer.CwtchPeer, conversation int, fileKey string) error { + return f.VerifyOrResumeDownload(profile, conversation, fileKey, files.MaxManifestSize*files.DefaultChunkSize) +} + func (f *Functionality) VerifyOrResumeDownload(profile peer.CwtchPeer, conversation int, fileKey string, size uint64) error { if manifestFilePath, exists := profile.GetScopedZonedAttribute(attr.LocalScope, attr.FilesharingZone, fmt.Sprintf("%s.manifest", fileKey)); exists { if downloadfilepath, exists := profile.GetScopedZonedAttribute(attr.LocalScope, attr.FilesharingZone, fmt.Sprintf("%s.path", fileKey)); exists {