mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 00:40:03 +01:00
compress: check type assertion in SetTier - fixes #4941
This commit is contained in:
parent
4daf8b7083
commit
eb090d3544
@ -1225,8 +1225,8 @@ func (o *Object) Hash(ctx context.Context, ht hash.Type) (string, error) {
|
|||||||
// multiple storage classes supported
|
// multiple storage classes supported
|
||||||
func (o *Object) SetTier(tier string) error {
|
func (o *Object) SetTier(tier string) error {
|
||||||
do, ok := o.Object.(fs.SetTierer)
|
do, ok := o.Object.(fs.SetTierer)
|
||||||
mdo, ok := o.mo.(fs.SetTierer)
|
mdo, mok := o.mo.(fs.SetTierer)
|
||||||
if !ok {
|
if !(ok && mok) {
|
||||||
return errors.New("press: underlying remote does not support SetTier")
|
return errors.New("press: underlying remote does not support SetTier")
|
||||||
}
|
}
|
||||||
if err := mdo.SetTier(tier); err != nil {
|
if err := mdo.SetTier(tier); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user