From 49543518f000b6228e9decd9454901f0a7f00070 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Mon, 25 Nov 2024 09:09:39 +0100 Subject: [PATCH] fix typo Signed-off-by: Christian Richter --- backend/webdav/tus-uploader.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/webdav/tus-uploader.go b/backend/webdav/tus-uploader.go index 2b3c850b5..e0caa79f9 100644 --- a/backend/webdav/tus-uploader.go +++ b/backend/webdav/tus-uploader.go @@ -54,7 +54,7 @@ func (f *Fs) shouldRetryChunk(ctx context.Context, resp *http.Response, err erro return f.shouldRetry(ctx, resp, err) } -func (u *Uploader) uploadChunck(ctx context.Context, body io.Reader, size int64, offset int64, options ...fs.OpenOption) (int64, error) { +func (u *Uploader) uploadChunk(ctx context.Context, body io.Reader, size int64, offset int64, options ...fs.OpenOption) (int64, error) { var method string if !u.overridePatchMethod { @@ -110,7 +110,7 @@ func (u *Uploader) Upload(ctx context.Context, options ...fs.OpenOption) error { fs.Debug(u.fs, "Uploaded starts") for u.offset < u.upload.size && !u.aborted { - err := u.UploadChunck(ctx, cnt, options...) + err := u.UploadChunk(ctx, cnt, options...) cnt++ if err != nil { return err @@ -121,8 +121,8 @@ func (u *Uploader) Upload(ctx context.Context, options ...fs.OpenOption) error { return nil } -// UploadChunck uploads a single chunck. -func (u *Uploader) UploadChunck(ctx context.Context, cnt int, options ...fs.OpenOption) error { +// UploadChunk uploads a single chunk. +func (u *Uploader) UploadChunk(ctx context.Context, cnt int, options ...fs.OpenOption) error { chunkSize := u.fs.opt.ChunkSize data := make([]byte, chunkSize) @@ -142,7 +142,7 @@ func (u *Uploader) UploadChunck(ctx context.Context, cnt int, options ...fs.Open body := bytes.NewBuffer(data[:size]) - newOffset, err := u.uploadChunck(ctx, body, int64(size), u.offset, options...) + newOffset, err := u.uploadChunk(ctx, body, int64(size), u.offset, options...) if err == nil { fs.Debugf(u.fs, "Uploaded chunk no %d ok, range %d -> %d", cnt, u.offset, newOffset)