mirror of
https://github.com/rclone/rclone.git
synced 2025-07-16 04:05:25 +02:00
s3: fix url decoding of NextMarker - fixes #3799
Before this patch we were failing to URL decode the NextMarker when url encoding was used for the listing. The result of this was duplicated listings entries for directories with >1000 entries where the NextMarker was a file containing a space.
This commit is contained in:
@ -1398,6 +1398,12 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
|
|||||||
} else {
|
} else {
|
||||||
marker = resp.NextMarker
|
marker = resp.NextMarker
|
||||||
}
|
}
|
||||||
|
if urlEncodeListings {
|
||||||
|
*marker, err = url.QueryUnescape(*marker)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrapf(err, "failed to URL decode NextMarker %q", *marker)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user