-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Notepad++ x86 on 64Bit Windows can't save files in C:\Windows\Sysnative\ #11196
Comments
From the @dodmi report is clear (e.g. look at the N++ screenshot taken - there is the [Administrator] visible), that the N++ has been already elevated before by launching from the elevated cmd. So there should not be the "Save failed - Do you want ... Administrator mode?" msgbox visible. I have tried exactly your steps but with the current 8.3.1 x86 portable. And I was able to save that file. So there should be something else in your way. But - on another PC I have the ZoneAlarm firewall installed and it failed to do so. When I looked at the ZoneAlarm setting, I have found an advanced setting "Lock host file" checked. After I unchecked that, I have started to be able to save ok. So maybe you have a similar SW installed on your computer(?). Maybe an antivirus solution(?). Edited: Save failed When I select 'Deutsch' N++ localization, it becames exactly the message as in your report: Speichern fehlgeschlagen! |
Ok, now I am able to reproduce your issue reported. Edited: |
I have found the culprit here - it is the default using of the flag Without this flag the CreateFile call in the described situation succeeds, so such writing is then possible. Contrary to the N++, the standard Windows Notepad works ok in such situation, you can try that by: |
Yes, in the version 8.1.6 has been exchanged the original POSIX IO (fopen/fwrite) for the WIN32 API one (CreateFile/WriteFile) for the file saving. For this issue is problematic only the use of the 'case sensitive file access flag' FILE_FLAG_POSIX_SEMANTICS. To tell the truth - I do not fully understand yet, why this 'case sensitive' flag causes this fail of the CreateFile API. One explanation could be that the Windows OS inherent substitute for the "Sysnative" is e.g. "SYSTEM32" instead of the real "System32" used on the disk ("at least that is used on my PC ... "C:\Windows\System32"). Edited: @pnedev |
Hi @xomx , The |
Thanks @xomx .
I guess that Don will not have problems merging your PR because we discussed that flag before and he was asking me about the justification of |
@dodmi |
How can I do the same? |
Just use it like:
A 64-bit Windows OS internal 'shim' translates transparently this "Sysnative" string to its 64-bit equivalent (or better - it redirects such 32-bit app request to the 64-bit "C:\Windows\System32" counterpart). |
@xomx |
Exactly. |
-- Nothing to see here, anymore --
The text was updated successfully, but these errors were encountered: