It is currently February 23rd, 2024, 4:15 am

[BUG] Adding ] to a folder name bombs the setting file

Report bugs with the Rainmeter application and suggest features.
User avatar
Jeff
Posts: 324
Joined: September 3rd, 2018, 11:18 am

[BUG] Adding ] to a folder name bombs the setting file

Post by Jeff »

This is a funny one, just add ] to any skin (folder) name and load it, Rainmeter will try to create sections in the setting file until it gives up and the settings file will be funky. It's always gonna be 28 lines and then it gives up. The funny part is someone on Discord did this and asked why their settings file is almost 3700 lines long, which means they have had this happen for roughly 130 days or so (math is fun!). Below is a snippet for example sake, though you can just do it yourself and see too.

Code: Select all

[Ar[n]hem]
Active=0

[Ar[n]hem]
Active=0
[Ar[n]hem]
Active=2

[Ar[n]hem]
Active=0
[Ar[n]hem]
WindowX=0
[Ar[n]hem]
WindowY=0
[Ar[n]hem]
ClickThrough=0
[Ar[n]hem]
Draggable=1
[Ar[n]hem]
SnapEdges=1
[Ar[n]hem]
KeepOnScreen=1
[Ar[n]hem]
AlwaysOnTop=0

[Ar[n]hem]
Active=0
[Ar[n]hem]
WindowX=2815
[Ar[n]hem]
WindowY=750

[Ar[n]hem]
Active=0
[Ar[n]hem]
Active=0
User avatar
Yincognito
Rainmeter Sage
Posts: 6781
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG] Adding ] to a folder name bombs the setting file

Post by Yincognito »

Jeff wrote: January 28th, 2024, 3:12 pm This is a funny one, just add ] to any skin (folder) name and load it, Rainmeter will try to create sections in the setting file until it gives up and the settings file will be funky. It's always gonna be 28 lines and then it gives up. The funny part is someone on Discord did this and asked why their settings file is almost 3700 lines long, which means they have had this happen for roughly 130 days or so (math is fun!). Below is a snippet for example sake, though you can just do it yourself and see too.

Code: Select all

[Ar[n]hem]
Active=0

[Ar[n]hem]
Active=0
[Ar[n]hem]
Active=2

[Ar[n]hem]
Active=0
[Ar[n]hem]
WindowX=0
[Ar[n]hem]
WindowY=0
[Ar[n]hem]
ClickThrough=0
[Ar[n]hem]
Draggable=1
[Ar[n]hem]
SnapEdges=1
[Ar[n]hem]
KeepOnScreen=1
[Ar[n]hem]
AlwaysOnTop=0

[Ar[n]hem]
Active=0
[Ar[n]hem]
WindowX=2815
[Ar[n]hem]
WindowY=750

[Ar[n]hem]
Active=0
[Ar[n]hem]
Active=0
For the record, this has been noticed on other occasions as well, see the thread below:
https://forum.rainmeter.net/viewtopic.php?t=43296#p219962
Not sure if this qualifies as a "real" bug, since it's somewhat logical to avoid using square brackets in such names given the fact that they represent section markers for the Rainmeter parser (or an .ini syntax, for that matter), but yeah, it does produce the unwanted effects that a bug is producing... :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16007
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG] Adding ] to a folder name bombs the setting file

Post by balala »

I add just my opinion. Strictly my opinion, but I believe this.
Using brackets on skin names is insane. Sorry I have to say this, but it simply reveals stupidity. Once again, I don't want to upset anyone, so just asking: why to use them either on name of skins or configs? Maybe just my boundaries (many said I am extremely limited), but I just can't imagine a reason to use those brackets.
User avatar
Jeff
Posts: 324
Joined: September 3rd, 2018, 11:18 am

Re: [BUG] Adding ] to a folder name bombs the setting file

Post by Jeff »

Yincognito wrote: January 28th, 2024, 3:29 pm For the record, this has been noticed on other occasions as well, see the thread below:
https://forum.rainmeter.net/viewtopic.php?t=43296#p219962
Oh fuuuu... didn't notice, if the mods/devs already had this under radar with that post, this post can be deleted no problem
balala wrote: January 28th, 2024, 6:52 pm I don't want to upset anyone, so just asking: why to use them either on name of skins or configs?
Very simple reason, the wallpaper they found on Google had [A] in it, that's all. (The image is the finished skin)
User avatar
Yincognito
Rainmeter Sage
Posts: 6781
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG] Adding ] to a folder name bombs the setting file

Post by Yincognito »

Jeff wrote: February 6th, 2024, 10:03 pm Oh fuuuu... didn't notice, if the mods/devs already had this under radar with that post, this post can be deleted no problem
I wouldn't say that your post is a problem, one can't always be aware of everything. Plus, that thread didn't indicate that the square bracket thingy was 100% the exclusive culprit for the issue described there, so yours probably comes as a confirmation of that. By the way, if one really wants to use square brackets in such cases, a nice trick (my favorite one, I even use it in Substitute options or in messages on this forum to circumvent the [​code] and [​/code] tags and post them "literally") is to use the zero width space before or after the square bracket(s). This will keep the syntax visually unchanged, but will not be interpreted as a section marker (didn't test it in the case described here, but I don't see why it shouldn't work).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16007
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG] Adding ] to a folder name bombs the setting file

Post by balala »

Jeff wrote: February 6th, 2024, 10:03 pm Very simple reason, the wallpaper they found on Google had [A] in it, that's all. (The image is the finished skin)
Alright, makes sense this way indeed.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5326
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [BUG] Adding ] to a folder name bombs the setting file

Post by eclectic-tech »

The person who named that image with [A] should have followed some preferred naming guidelines (especially the second on the right!):
namingconventions.png
You do not have the required permissions to view the files attached to this post.