rnp
rnp copied to clipboard
Incorrect user home folder on Windows
Description
Incorrect user home folder on Windows
Expected Behavior
When Windows native environment (not MSys, not cygwin) is used user home folder is defined by USERPROFILE environment variable
Actual Behavior
rnp and rnp tests always use HOME
Practically it means that:
- rnp cli tests (Python tests) can be executed in MSys environment only because gpg follows HOME/USERPROFILE convention and thus is not compatible with RNP
- when rnp is executed in native Windows environment it creates key rings not in user home folder but elsewhere (empty string is used as HOME which probably means current folder -- may be wrong)
I propose to use SHGetFolderPath()
with CSIDL_PROFILE
argument to get the Windows user home directory.
@antonsviridenko Thanks for the suggestion! You are welcome to make PR implementing this :)