rules.ini raw file gets extra rows/rules when edited via UI

Found a serious/minor bug in PopTray? Tell me about it.

Moderators: KY Dave, jojobear99, Rdsok

Locked
GaryGo
Enthusiast
Posts: 48
Joined: Mon Mar 29, 2004 7:37 pm
Location: Upstate NY, USA

rules.ini raw file gets extra rows/rules when edited via UI

Post by GaryGo » Sat Jul 02, 2005 2:41 pm

I upgraded from an old PopTray to the latest 3.1 download, a few weeks ago. I copied my rules.ini file over and it seemed to be loaded correctly, and PopTray acts as expected. So far so good.

I combined some rules into a multi-row rule. I did this with several rules, into several different multi-row rules, and deleted the extra rules. At some point, I looked at my rules.ini file with a text editor.

The NumRules line near the top had a different number than the actual number of rules in the file. In the user interface, only the first N rules are shown (equal to NumRules=N). The remaining rules in rules.ini are apparently ignored (and they are copies of existing rules).

Also, some rules have extra rows in them. So, a rule might have RowCount=1, but it will have Area2, Func2, etc. These extra rows do not appear in the UI. The extra rows are rows that were added to another rule, and also got copied to the end of unrelated rules.

As far as I can tell, the extra rules and rows are ignored (because NumRules and RowCount are always correct). And PopTray performs as desired. But this seems like a bug and it increases the size of rules.ini.

I can't find any other mention of this in the forum. To test, try creating a rules.ini file with ten rules, each with one row. Use delete and log, and give a new name to each rule. Then add rule #6 as a new row of rule #5, and delete rule #6. Then look at rules.ini. I did not try this specific test, but the bug occurs every time I change my rules.

Gary

User avatar
KY Dave
Not the Developer
Posts: 1599
Joined: Thu Mar 14, 2002 7:29 pm
Location: Burkesville, KY. U.S.A.
Contact:

Post by KY Dave » Sat Jul 02, 2005 3:11 pm

Renier has an answer to a similar posting in the thread linked below...
viewtopic.php?t=1760

Here is his quote...
Renier wrote:I don't bother with deleting deleted rules from the Rules.ini file, but PopTray will overwrite them if you create new rules. That way there is a manual way of undeleting a rule. You can safely remove them from you ini file, just make sure you have at lest the number of rules specified in NumRules.
KY Dave

Family Blog
You can STOP SPAM using PopFile and PopTray.

GaryGo
Enthusiast
Posts: 48
Joined: Mon Mar 29, 2004 7:37 pm
Location: Upstate NY, USA

Post by GaryGo » Sat Jul 02, 2005 8:15 pm

Yup, that's the thread I was looking for. It's OK that the rules and rows aren't deleted. However, if the concern is for retrieving accidentally deleted rules, I'd rather see the whole .ini file backed up (multiple times), or maybe a separate .ini file for deleted rules, and then the active .ini file coule be trimmed to the minimum size. I use a lot of rules and my ini file was 200K before I manually trimmed out the junk and got it down to 100K.

If I ever were to submit a plugin/utility for PopTray, it would be an alternate rules editor. The current editor is adequate and usable, but I could imagine additional features such as copy-paste, categorization and sorting.

Gary

Locked

Who is online

Users browsing this forum: No registered users and 8 guests