mirror of
https://github.com/rclone/rclone.git
synced 2025-08-17 00:51:34 +02:00
rmdirs: remove directories concurrently controlled by --checkers
See: https://forum.rclone.org/t/how-to-list-empty-directories-recursively/40995
This commit is contained in:
@ -702,6 +702,22 @@ func TestRmdirsNoLeaveRoot(t *testing.T) {
|
||||
fs.GetModifyWindow(ctx, r.Fremote),
|
||||
)
|
||||
|
||||
// Delete the files so we can remove everything including the root
|
||||
for _, file := range []fstest.Item{file1, file2} {
|
||||
o, err := r.Fremote.NewObject(ctx, file.Path)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, o.Remove(ctx))
|
||||
}
|
||||
|
||||
require.NoError(t, operations.Rmdirs(ctx, r.Fremote, "", false))
|
||||
|
||||
fstest.CheckListingWithPrecision(
|
||||
t,
|
||||
r.Fremote,
|
||||
[]fstest.Item{},
|
||||
[]string{},
|
||||
fs.GetModifyWindow(ctx, r.Fremote),
|
||||
)
|
||||
}
|
||||
|
||||
func TestRmdirsLeaveRoot(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user