Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

fs: add ChunkWriterDoesntSeek feature flag and set it for b2

Nick Craig-Woode8fcde8de148
diff --git a/backend/b2/b2.go b/backend/b2/b2.go
index 35540efcb..6c83c5895 100644
--- a/backend/b2/b2.go
+++ b/backend/b2/b2.go
@@ -505,10 +505,11 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}
f.setRoot(root)
f.features = (&fs.Features{
- ReadMimeType: true,
- WriteMimeType: true,
- BucketBased: true,
- BucketBasedRootOK: true,
+ ReadMimeType: true,
+ WriteMimeType: true,
+ BucketBased: true,
+ BucketBasedRootOK: true,
+ ChunkWriterDoesntSeek: true,
}).Fill(ctx, f)
// Set the test flag if required
if opt.TestMode != "" {
diff --git a/fs/features.go b/fs/features.go
index 82b8226c7..991b0aceb 100644
--- a/fs/features.go
+++ b/fs/features.go
@@ -33,6 +33,7 @@ type Features struct {
PartialUploads bool // uploaded file can appear incomplete on the fs while it's being uploaded
NoMultiThreading bool // set if can't have multiplethreads on one download open
Overlay bool // this wraps one or more backends to add functionality
+ ChunkWriterDoesntSeek bool // set if the chunk writer doesn't need to read the data more than once
// Purge all files in the directory specified
//