Skip to content
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

Incorrect user home folder on Windows #2149

Open
maxirmx opened this issue Nov 17, 2023 · 2 comments
Open

Incorrect user home folder on Windows #2149

maxirmx opened this issue Nov 17, 2023 · 2 comments
Assignees

Comments

@maxirmx
Copy link
Member

maxirmx commented Nov 17, 2023

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:

  1. 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
  2. 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)
@antonsviridenko
Copy link
Contributor

I propose to use SHGetFolderPath() with CSIDL_PROFILE argument to get the Windows user home directory.

@ni4
Copy link
Contributor

ni4 commented Nov 27, 2023

@antonsviridenko Thanks for the suggestion! You are welcome to make PR implementing this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants