"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
filen: fix potential panic in case of error during upload
Enduriel88b484722a3f
diff --git a/backend/filen/filen.go b/backend/filen/filen.goindex 72095d39d..c3d3736ee 100644--- a/backend/filen/filen.go+++ b/backend/filen/filen.go@@ -415,13 +415,13 @@ func (cw *chunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader ireturn totalWritten, err}resp, err := cw.filen.UploadChunk(ctx, &cw.FileUpload, realChunkNumber, chunkReadSlice)+ if err != nil {+ return totalWritten, err+ }select { // only care about getting this oncecase cw.bucketAndRegion <- *resp:default:}- if err != nil {- return totalWritten, err- }totalWritten += int64(len(chunkReadSlice))realChunkNumber++}