forked from TrueCloudLab/rclone
s3: fix purging of root directory with --s3-directory-markers - fixes #7247
This commit is contained in:
parent
9c14562850
commit
b95bda1e92
1 changed files with 4 additions and 0 deletions
|
@ -4833,6 +4833,10 @@ func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
|
|||
if isDirectory {
|
||||
return nil
|
||||
}
|
||||
// If the root is a dirmarker it will have lost its trailing /
|
||||
if remote == "" {
|
||||
remote = "/"
|
||||
}
|
||||
oi, err := f.newObjectWithInfo(ctx, remote, object, versionID)
|
||||
if err != nil {
|
||||
fs.Errorf(object, "Can't create object %+v", err)
|
||||
|
|
Loading…
Reference in a new issue