Description
There has been a long standing issue at the Jupyter Lab repo around the inability to delete a non-empty directory (see comments jupyterlab/jupyterlab#835 (comment) and below for recent discussion). On some platforms (Mac OS for example), a non-empty directory can be deleted easily. However, on other platforms (including the official docker container jupyter/minimal-notebook
), non-empty directories cannot be deleted. This appears to be an intentional design decision to not allow deletion of non-empty directories (see this code here).
However, there are lots of legitimate cases to delete a non-empty directory, so a much better solution would be to ask for confirmation before deleting the non-empty directory. Failing that, there should be a config parameter that allows for the deletion of non-empty directories.
Unfortunately, I'm not equipped to do development on the notebook server, so I cannot produce a pull request myself. Is this an issue that the maintainers are willing to consider?