From: Matt Joiner Date: Thu, 29 May 2025 07:43:01 +0000 (+1000) Subject: It's not an error if the write file does not exist after trying to rename from the... X-Git-Tag: v1.59.0~96 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1177f4d06ebfdffa6def98af34c8847fc36745bb;p=btrtrc.git It's not an error if the write file does not exist after trying to rename from the read file --- 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