From 1177f4d06ebfdffa6def98af34c8847fc36745bb Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 29 May 2025 17:43:01 +1000 Subject: [PATCH] It's not an error if the write file does not exist after trying to rename from the read file --- storage/file-piece.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/file-piece.go b/storage/file-piece.go index 30746320..fe8cd6ba 100644 --- a/storage/file-piece.go +++ b/storage/file-piece.go @@ -248,6 +248,9 @@ func (me *filePieceImpl) onFileNotComplete(f file) (err error) { } } info, err := os.Stat(me.pathForWrite(f)) + if errors.Is(err, fs.ErrNotExist) { + return nil + } if err != nil { err = fmt.Errorf("statting file: %w", err) return -- 2.51.0