"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
mount: removed unnecessary byte slice allocation for reads
Anagh Kumar Baranwald0eb884262a2
diff --git a/cmd/mount/handle.go b/cmd/mount/handle.goindex 7b7b6c010..c3293acc3 100644--- a/cmd/mount/handle.go+++ b/cmd/mount/handle.go@@ -25,15 +25,13 @@ var _ fusefs.HandleReader = (*FileHandle)(nil)func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) (err error) {var n intdefer log.Trace(fh, "len=%d, offset=%d", req.Size, req.Offset)("read=%d, err=%v", &n, &err)- data := make([]byte, req.Size)+ data := resp.Data[:req.Size]n, err = fh.Handle.ReadAt(data, req.Offset)+ resp.Data = data[:n]if err == io.EOF {err = nil- } else if err != nil {- return translateError(err)}- resp.Data = data[:n]- return nil+ return translateError(err)}// Check interface satisfied