From 89e8fb48180cd01c4107fe91946920cdb4bb8ee6 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 17 Feb 2021 13:06:24 +0000 Subject: [PATCH] local: don't ignore preallocate disk full errors See: https://forum.rclone.org/t/input-output-error-copying-to-cifs-mount-disk-space-filled/22163 --- backend/local/local.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/local/local.go b/backend/local/local.go index 18f399250..60491c6b7 100644 --- a/backend/local/local.go +++ b/backend/local/local.go @@ -1145,6 +1145,10 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op err = file.PreAllocate(src.Size(), f) if err != nil { fs.Debugf(o, "Failed to pre-allocate: %v", err) + if err == file.ErrDiskFull { + _ = f.Close() + return err + } } } out = f