-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rm does not delete the directory if its input is a directory with recursive True #918
Comments
In the debugger I saw that:
In this code, all the paths (real dirs and files) are detected in the |
It seems expand_path is not recovering the zero-length directory placeholder with "/" suffix. We could arbitarily add it here, since attempting to remove it if it doesn't exist shouldn't have an cost, or fix expand_path. I think I prefer the former: "path/" isn't really a member of "path". |
If I try a direct call to the empy dir:
There is the exception "FileExistsError". The path is empty though. |
It is
(with the "/" suffix) that you want. This is a FILE, which is exactly the problem. |
I tried without success. If I use as value for the path either a "file path" as Thanks |
As stated in the title, it seems to me, that the API
rm
does not remove the directory itself if the input path its a directory and therecursive
flag is set toTrue
:I checked by s3 bucket from the dashboard and the directory does still exists, while its content does not. The documentation says that:
I guess the implementation does not follow the documentation and a direct
rmdir
API call is needed in order to delete also the directory.The text was updated successfully, but these errors were encountered: