Exclude folder from 'Find in files'

Maybe this question has already been made, but I couldn’t find a working solution. I’ve got a project, in a folder, let’s say /home/myuser/foo. I need to exclude whatever is in /home/myuser/foo/static from “Find in files” searches, but not /home/myuser/foo/bar/static or other folders with the same name but located elsewhere.
If I add /home/myuser/foo/static to ‘Exclude’ in Find Dialog, nothing changes. Same if I mention it in Project preferences folders to exclude.
Any suggestion?

Unfortunately include/exclude only considers file names at the moment. Please consider filing an enhancement request:

Ok, thanks, I will.