This is a consequence of the fact that these options are not used in the object generator in Branch.delete_objects().
To fix, pass delimiter = "" if recursive else "/", just as we do for fs.ls(). For maxdepth, we can just count the number of slashes in the objects' path name (the rootdir is not included IIRC).
This is a consequence of the fact that these options are not used in the object generator in
Branch.delete_objects()
.To fix, pass
delimiter = "" if recursive else "/"
, just as we do forfs.ls()
. For maxdepth, we can just count the number of slashes in the objects' path name (the rootdir is not included IIRC).