5digits / dactyl

Pentadactyl and other related Gecko extensions
Other
470 stars 98 forks source link

Account for When the Default Profile Name has Numbers #162

Open notbdu opened 8 years ago

notbdu commented 8 years ago

Sometimes the default profile name in the profiles.ini file for Firefox has numbers in it.

The default configuration on my computer was:

[General]
StartWithLastProfile=1

[Profile0]
Name=default-1461165984967
IsRelative=1
Path=Profiles/15xzltqw.default-1461165984967

I just changed the RegEx from /\nName=default\n/ to /\nName=default([\-0-9]*)?\n/ in order to match a number if one exists.

This fix will not break matching for when the config is just:

[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=Profiles/15xzltqw.default-1461165984967