From 4537d9b5cf2982bbeeec828c15e77ee524e2f414 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 2 Dec 2019 16:04:03 +0000 Subject: [PATCH] operations: make reopen code error on NoLowLevelRetry errors - fixes #3777 --- fs/operations/reopen.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/operations/reopen.go b/fs/operations/reopen.go index d0af5f5b3..879bffee3 100644 --- a/fs/operations/reopen.go +++ b/fs/operations/reopen.go @@ -7,6 +7,7 @@ import ( "github.com/pkg/errors" "github.com/rclone/rclone/fs" + "github.com/rclone/rclone/fs/fserrors" ) // reOpen is a wrapper for an object reader which reopens the stream on error @@ -104,7 +105,7 @@ func (h *reOpen) Read(p []byte) (n int, err error) { h.err = err } h.read += int64(n) - if err != nil && err != io.EOF { + if err != nil && err != io.EOF && !fserrors.IsNoLowLevelRetryError(err) { // close underlying stream h.opened = false _ = h.rc.Close()