fs: add ChunkWriterDoesntSeek feature flag and set it for b2

This commit is contained in:
Nick Craig-Wood 2023-10-08 18:09:09 +01:00
parent 72dfdd97d8
commit e8fcde8de1
2 changed files with 6 additions and 4 deletions

View file

@ -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 != "" {

View file

@ -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
//