Skip to content

Firefox auto-import breaks if profile name does not end with .default #212

@shv-q3

Description

@shv-q3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions