mirror of
https://github.com/rclone/rclone.git
synced 2025-01-10 16:28:30 +01:00
s3: fix purging of root directory with --s3-directory-markers - fixes #7247
This commit is contained in:
parent
9c14562850
commit
b95bda1e92
@ -4833,6 +4833,10 @@ func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
|
|||||||
if isDirectory {
|
if isDirectory {
|
||||||
return nil
|
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)
|
oi, err := f.newObjectWithInfo(ctx, remote, object, versionID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.Errorf(object, "Can't create object %+v", err)
|
fs.Errorf(object, "Can't create object %+v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user