When using WsCleanup with a blacklist-based filter (only EXCLUDE type patterns) and the deleteDirs=true option, parent directories of explicitly excluded paths are not protected.
As a result, the parent directory is then deleted recursively, also deleting the explicitly excluded child directory.
If an exclude pattern matches a file, all parent directories (but not their contents!) would need to be implicitly excluded as well.
The required logic is inverse from use cases where the parent directory would need to be included implicitly (e.g. a copy).