Problem with multiple file masks

Use this forum to ask any questions and to submit bug reports

Moderator: vuser

Post Reply
vuser
Posts: 38
Joined: Sat May 01, 2010 8:11 pm

Problem with multiple file masks

Post by vuser »

I've used multiple file masks for years, and I just found out you can have exclusion masks. That's excellent! I did notice something a little odd, though.

I wanted to show all files that end with _x.sql but didn't contain _comp_. So, I thought I'd use this mask list:

*_x.sql,!*_comp_*

Unfortunately, V shows every file in the folder except for those with a mask of *_comp_*.sql. This includes files ending in .bak and files containing _comp_ that didn't end in _x.sql.

But if I reverse the order of the masks:

!*_comp_*,*_x.sql

V does exactly what I expect.

I'm okay with doing that, I just didn't expect it. Should the exclusions always come first?
FileViewer
Site Admin
Posts: 287
Joined: Fri Apr 30, 2010 5:50 pm

Re: Problem with multiple file masks

Post by FileViewer »

*_x.sql,!*_comp_*
No. As you have found out, this will not work.

Multiple file masks will (usually) display files that match any of the masks. In the above example, .bak files will match !*_comp_*, so they will be displayed.
But if I reverse the order of the masks (!*_comp_*,*_x.sql) V does exactly what I expect.
Yes. Putting the exclusion at the beginning causes V to display files that match all of the masks.

It has been a while since I implemented this - and I can't recall if this behavior is accidental or intentional. I'd like to think it is the latter!

Regards,
Charles.
Post Reply