Repository: nvaccess/nvda

Issue:
word problems 2013 

### Steps to reproduce:
I have a friend's computer with problems.
This machine is with office 2013 and windows 10, I didn't install these 2 software.
I updated on this machine only nvda and the add-ons.
In several parts of the word, nvda doesn't say anything:
When we press alt inside word nvda doesn't announce the focus in the menu, and when we walk with tabe it doesn't read anything either.
This also occurred within outlook.
When we close the document without saving in the word question if we want to save the changes when walking with tabe again, nvda does not announce anything.
When opening the word on the first screen where you can choose the type of document to create nvda again is muted when walking with tabe or arrows.
I've already tested it with disabled add-ons and the problem continued.
I already ran the registry fix tool with and the error continues.
Nvda seems to work well in any other area of windows 10 and other programs. 
### Actual behavior:
nvda mute on some word screens 
### Expected behavior:
nvda read screens normally 
### System configuration
#### NVDA installed/portable/running from source:
instaled
#### NVDA version:
alfa 24160
#### Windows version:
10 10.0.19043.
#### Name and version of other software in use when reproducing the issue:
office 2013
#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
no
#### If NVDA add-ons are disabled, is your problem still occurring?
yes
#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
yes
log of the various screens where I noticed the error.
Sorry, there are so many errors that I couldn't selessionar only the point where it matters in the log, but I tried to turn on nvda at the time the error occurs to be relatively smaller. 
[exit word.txt](https://github.com/nvaccess/nvda/files/7445713/exit.word.txt)
[select word.txt](https://github.com/nvaccess/nvda/files/7445714/select.word.txt)
[start word.txt](https://github.com/nvaccess/nvda/files/7445715/start.word.txt)



Discussion:
I'm afraid I've caused this regression. Would you be able to:
- Test with NVDA 2021.2 the problem should no longer exists
- Assuming Word would work with 2021.2 could you please open Python console when focused in Word paste `focus.appModule.appPath` move with F6 to the output panel and paste its output here.

Many thanks and sorry for the inconvenience!

Resolving patch:
diff --git a/source/fileUtils.py b/source/fileUtils.py
--- a/source/fileUtils.py
+++ b/source/fileUtils.py
@@ -58,8 +58,8 @@ def funcWrapper(filePath, *attributes):
 		nativeSys32 = shlobj.SHGetKnownFolderPath(shlobj.FolderId.SYSTEM)
 		if (
 			systemUtils.hasSyswow64Dir()
-			# `os.path.commonpath` is necessary to perform case-insensitive comparisons
-			and os.path.commonpath([nativeSys32]) == os.path.commonpath([nativeSys32, filePath])
+			# Path's returned from `appModule.appPath` and `shlobj.SHGetKnownFolderPath` often differ in case
+			and filePath.casefold().startswith(nativeSys32.casefold())
 		):
 			with winKernel.suspendWow64Redirection():
 				return func(filePath, *attributes)


Test patch: