-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Firefox auto-import breaks if profile name does not end with .default #212
Comments
Thank you for the submitting report. I'll look at this issue. We decided only look for default file names, and I didn't expect that such format exists. |
@shv-q3 on which platform is this happening? @alex-bender from the contents of |
@shv-q3 can you please test the patch and confirm it works for you? @alex-bender I have pushed this interim patch because there was no timeline from you by when you'll be able to fix this critical issue. If you are interested in implementing reading from the |
@jarun Hi! I would like to take it but I want to discuss it with you first. It was my initial idea to read
|
Yes, I wasn't aware of the fact that the ini file says explicitly which is the default profile. As I see it's there, and is a good way to figure out the default profile. I am not sure when I will be available. Just leave your questions here. Also, the platform may not be relevant. You can backup your .mozilla directory and make changes inside to match the scenario. As long as you don't run Firefox in between and replace back the original directory everything should be fine. |
So do you want me to just parse raw ini file or use configparser module? |
Raw parse. No extra deps. |
Otherwise, is configparser module installed by default with python? In that case do a local import. |
@jarun yeah, it's default module.
Ok |
@alex-bender @jarun |
@shv-q3 lets wait jarun. Your comment looks a bit obscure for me. |
@shv-q3 Alex has raised a review already so I'm checking that. Please feel free to review the PR. |
Firefox auto-imprt breaks if profile name does not end with .default, with firefox profile name like 4r3pvu9s.default-1478290660929 this happens:
./buku.py --ai
Traceback (most recent call last):
File "./buku.py", line 4338, in
main()
File "./buku.py", line 4288, in main
bdb.auto_import_from_browser()
File "./buku.py", line 2175, in auto_import_from_browser
profile = get_firefox_profile_name(DEFAULT_FF_FOLDER)
File "./buku.py", line 2571, in get_firefox_profile_name
profile = [name[:-8] for name in names if name.endswith('.default')][0]
IndexError: list index out of range
I tested many profile names and all that does not end with .default return error
so the solution could be reading profile names from profiles.ini in mozilla profile folder.
I did tests only on arch linux, dont know for other distros
The text was updated successfully, but these errors were encountered: