bassmanitram / actions-for-nautilus

An extension to the Gnome "Files" file manager that allows you to add arbitrary actions to the file selection context menu.
Apache License 2.0
168 stars 16 forks source link

Multiple "not" rules do not resolve correctly. #10

Closed bassmanitram closed 2 years ago

bassmanitram commented 2 years ago

E.g. the following mimetype "not" rules:

!application/pdf
!audio/*

should mean that the command is not displayed for PDFs nor for any audio file.

What it actually does is display the command for both because the algorithm is wrong - since an audio file is not a PDF, it displays, and since a PDF is not an audio file, it displays.

I'm working on it!

bassmanitram commented 2 years ago

The algorithms wrongly check that the selected files match any one rule, whereas they should be more sophisticated - they should match any positive rule and none of the negative rules.