From: yaoyongjie yaoyongjie@uniontech.com
--- dlls/ntdll/actctx.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index c6a4c46308c..6a885d9fb73 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -5252,6 +5252,7 @@ void actctx_init(void) { ACTCTXW ctx; HANDLE handle; + WCHAR buffer[5];
ctx.cbSize = sizeof(ctx); ctx.lpSource = NULL; @@ -5262,6 +5263,16 @@ void actctx_init(void) if (!RtlCreateActivationContext( &handle, &ctx )) process_actctx = check_actctx(handle);
NtCurrentTeb()->Peb->ActivationContextData = process_actctx; + + if (!RtlQueryActivationContextApplicationSettings( 0, NULL, L"http://schemas.microsoft.com/SMI/2016/WindowsSettings", + L"longPathAware", buffer, ARRAY_SIZE(buffer), NULL )) + { + TRACE( "got longPathAware=%s\n", debugstr_w(buffer) ); + if (!wcsicmp( buffer, L"true" )) + { + NtCurrentTeb()->Peb->IsLongPathAwareProcess = 1; + } + } }