fix: honor renamePart's PathNotFound (#21378)

This commit is contained in:
jiuker 2025-06-13 19:33:47 +08:00 committed by GitHub
parent e1fcaebc77
commit a6c538c5a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2976,7 +2976,7 @@ func (s *xlStorage) RenamePart(ctx context.Context, srcVolume, srcPath, dstVolum
return errFileAccessDenied
}
err = osErrToFileErr(err)
if errors.Is(err, errFileNotFound) {
if errors.Is(err, errFileNotFound) || errors.Is(err, errFileAccessDenied) {
return errUploadIDNotFound
}
return err