I found the solution here:
I have to change the type of filter to “Exclude expression” and set the filter text as: It works. But I still think that this is a bug. The user expects that the filter should work as it sounds: “exclude directories whose names contain”.