deltachat-core
deltachat-core copied to clipboard
allow importing a concrete key
currently, dc_imex(DC_IMEX_IMPORT_SELF_KEYS)
requests a directory as the first parameter; the directory is scanned for keys that are imported then.
while this is fine for mobile systems with limited file management functions, users on desktop may expect the option to select an explicit file, cmp. https://github.com/deltachat/deltachat-desktop/issues/251
i suggest to adapt dc_imex(DC_IMEX_IMPORT_SELF_KEYS)
so that the first parameter can be a file or a dircetory. this is also on pair with dc_imex(DC_IMEX_IMPORT_BACKUP)
which also expects a file.
for exporting keys i would not change the behavior currently as typically several keys will be imported, each to a separate file and i would like to avoid having a key management dialog in dc.
On Sat, Dec 22, 2018 at 05:28 -0800, björn petersen wrote:
currently,
dc_imex(DC_IMEX_IMPORT_SELF_KEYS)
requests a directory as the first parameter; the directory is scanned for keys that are imported then.while this is fine for mobile systems with limited file management functions, users on desktop may expect the option to select an explicit file, cmp. https://github.com/deltachat/deltachat-desktop/issues/251
i suggest to adapt
dc_imex(DC_IMEX_IMPORT_SELF_KEYS)
so that the first parameter can be a file or a dircetory. this is also on pair with ``dc_imex(DC_IMEX_IMPORT_BACKUP)` which also expects a file.
I'd tend to rather phase out passing directories for $reasons but find accepting both fine for now ;)
I'd tend to rather phase out passing directories for $reasons
this would result in some more effort on android, where there is no fileselector afaik. and i do not like to put much effort in this currently. it's mainly needed for experts and whatever is done with the keys in other apps is potentially more complicated than the export/import in dc imho.
but i think we should go for two different import types as DC_IMEX_IMPORT_SELF_KEYS_DIRECTORY and DC_IMEX_IMPORT_SELF_KEY_FILE - so that things cannot be mixed accidentally ...