Initially discussed in PR #286 and reported by @raffaelj
My main concern was to delete the empty folder after invalidating the page cache.
[...]
I think, it would be better to add an additional check, if the folder is empty. If so, the empty folder should be deleted by default - regardless of the $recursive = false option.
Proposed solution:
We opt out early, if a directory was already empty before and delete emptied directories only in recursive mode.
Remove the early return and the additional condition, so we do not leave behind empty directories.
Initially discussed in PR #286 and reported by @raffaelj
Proposed solution:
We opt out early, if a directory was already empty before and delete emptied directories only in recursive mode.
Remove the early return and the additional condition, so we do not leave behind empty directories.