mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 02:14:42 +01: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:
parent
1ab4985046
commit
0ecb8bc2f9
@ -1398,6 +1398,12 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
|
||||
} else {
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user