Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line regexp error for WINE apps #33

Open
metal450 opened this issue May 27, 2020 · 7 comments
Open

Command line regexp error for WINE apps #33

metal450 opened this issue May 27, 2020 · 7 comments

Comments

@metal450
Copy link

When a WINE app tries to call out to the internet, the notification will come from process "wine-preloader," with a command matching the Windows path of the application (i.e. "C:\Program Files\Microsoft Office\Office16\ONENOTE.EXE"). So to create rules for that specific WINE app, one would just use "from this command line." Selecting that & adding the rule works great.

However, if you then try to edit the rule (i.e. just to rename it - since you can't rename directly from the notification dialog ;) ), it prevents you from applying any edits, saying "Command line regexp error." I guess it's recognizing "C:\Program Files\Microsoft Office\Office16\ONENOTE.EXE" as a regexp, failing to validate it, & therefore rejecting any other edits - even if you just open that dialog & only change the rule name.

@gustavo-iniguez-goya
Copy link
Owner

I see, the thing is that I didn't want to put a check in every field to indicate that it was a regex rule, but I suspected that we could run into this kind of problems.

And I still don't want to add it, because it overcomplicates the GUI and is hard to maintain, so the solution for now is to convert it to a regex:

C:\Program Files\Microsoft Office\Office16\ONENOTE.EXE

I've been thinking lately in adding a info icon next to the fields, explaining what the field is and examples of regex and data you can type on it. A link to the documentation would be also useful.

@metal450
Copy link
Author

Well, it was auto-added by just checking "from this command line" in the notification - I didn't manually type the path. So either way, it should be able to accept the value it auto-generates.

@gustavo-iniguez-goya
Copy link
Owner

mmm, if it was autogenerated the type of rule is "simple", so the daemon will just test if a string is equal (byte per byte) to another. The problem is when editing the rule, that it interprets that is a regex.

I think I've got an idea to workaround this situation.

@metal450
Copy link
Author

metal450 commented Jun 29, 2020

In the interim, since I can't rename these rules from the editor, is there an easy way to make it reload them all from disk? Then I can just browse to & rename the filename to rename those rules :)

Edit: neverind, looks like just closing & reopening is enough. I thought it wasn't working, but I was just renaming the files, didn't realize I had to also edit the json. Renaming and modifying the json lets me change the names of these entries :)

@gustavo-iniguez-goya
Copy link
Owner

uh, can't it be edited from the GUI? what's the name of the rule? is there any error in the logs?

@metal450
Copy link
Author

Referring back to my 1st comment: "if you then try to edit the rule (i.e. just to rename it - since you can't rename directly from the notification dialog ;) ), it prevents you from applying any edits, saying "Command line regexp error.".

I guess it could from the UI - I figured it might be quicker to just edit the file though, when the command-line has a super long path or ton of special characters, each of which needs to be manually escaped to convert it to a regexp before the UI will let you edit the name. And that can be easy to make a mistake, so I was just editing the file directly to more easily change the name.

@gustavo-iniguez-goya
Copy link
Owner

ah ok, you're right. I thought it was a different problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants