-
Notifications
You must be signed in to change notification settings - Fork 53
Parse firefox profiles.ini files to get paths of profiles. #664
Conversation
This allows supporting profiles without a dot in their name, profiles outside of firefox directory and profiles that are symlinked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. It's look good to me.
@daudix-UFO what about you ?
@0xMRTT you know better, but it should not break anything, so LGTM! |
As I can see there isn't any modifications that could result in a break for flatpak. Maybe we should test ? |
Oki, give me a few minutes 😉 |
Just thinking about it, if someone uses absolute paths in a profile for a flatpaked firefox (with IsRelative=0 in profiles.ini), this could be an issue as absolute paths are not the same inside and outside the flatpak. But I doubt people do that in reality. |
Likely no, I doubt a lot of people create additional firefox profiles than a default one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firefox via Flatpak works just fine.
@0xMRTT merging? |
Signed-off-by: 0xMRTT <0xMRTT@proton.me>
@jle64 thanks for your contribution |
Parse firefox profiles.ini files to get paths of profiles
This parses firefox profiles.ini files to get the paths of the profiles instead of just treating any subdir of the firefox dir as a profile.
This allows supporting profiles without a dot in their name which the existing glob didn't match which can happen if they are named manually, as well as profiles configured to be outside of the firefox directory that were ignored and profiles that are symlinked (by adding a resolve() on the path before the is_dir()).
There is also an additional try condition to avoid failing for the remaining profiles if encountering a profile without the customChrome.css, as it might be installed on some profiles only.
Changelog
Please note that I have only tested on non-flatpak Firefox.