Repository navigation
Ensure that NVDA can get file version information for binaries in system32 on 64-bit versions of Windows #12943
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
Changes from 6 commits
7d3f89c
2ef4a97
85ab8ae
10c837b
a25a991
7c10407
fed9ac0
d94e309
1816b34
fdba9dc
e2896bc
0600845
177ab51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,7 +102,9 @@ def getInstalledUserConfigPath(): | |
| configInLocalAppData = bool(winreg.QueryValueEx(k, CONFIG_IN_LOCAL_APPDATA_SUBKEY)[0]) | ||
| except WindowsError: | ||
| configInLocalAppData=False | ||
| configParent=shlobj.SHGetFolderPath(0, shlobj.CSIDL_LOCAL_APPDATA if configInLocalAppData else shlobj.CSIDL_APPDATA) | ||
| configParent = shlobj.SHGetFolderPath( | ||
| 0, shlobj.CSIDL.LOCAL_APPDATA if configInLocalAppData else shlobj.CSIDL.APPDATA | ||
|
lukaszgo1 marked this conversation as resolved.
Outdated
|
||
| ) | ||
| try: | ||
| return os.path.join(configParent, "nvda") | ||
| except WindowsError: | ||
|
|
@@ -126,14 +128,6 @@ def getUserDefaultConfigPath(useInstalledPathIfExists=False): | |
| return installedUserConfigPath | ||
| return os.path.join(globalVars.appDir, 'userConfig') | ||
|
|
||
| def getSystemConfigPath(): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is likely to break backwards compat. I don't think that's a problem when this will be 2022.1
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've mentioned that consideration in the PR description. Given that we're branching for 2021.3 already this should not be a problem. Could you add this PR to the 2022.1 milestone so it is not forgotten?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, I must have missed that. |
||
| if isInstalledCopy(): | ||
| try: | ||
| return os.path.join(shlobj.SHGetFolderPath(0, shlobj.CSIDL_COMMON_APPDATA), "nvda") | ||
| except WindowsError: | ||
| pass | ||
| return None | ||
|
|
||
|
|
||
| SCRATCH_PAD_ONLY_DIRS = ( | ||
| 'appModules', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have this initialization as part of the initialize method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good idea here. I really believe we should try to avoid usages of
globalif at all possible - it makes any refactors unnecessarily difficult. My dislike forglobalaside please note thatappmoduleHandler.initializeis also executed when re-initializing app modules and therefore we would be callingSHGetFolderPathfor no reason ( these calls are probably pretty cheap but the return values cannot change during NVDA's lifetime). It should be possible to add additional argument toinitialize- something likeisFirstInitbut it would make code more complex without any real benefit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be my daily job being very C# oriented nowadays, but I consider executing code at the module level pretty terrible.
I don't insist though, let's see what NV Access people say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree that initializing this in a method would be much better.
If
_suspendWow64RedirectionForFileInfoRetrievalcould be useful in other modules, I would suggest abstracting this into a new module an initializing this incoreto avoid the "re-initializing" you mention.