mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Code quality
This commit is contained in:
parent
1a8334f1d3
commit
e391c98474
1 changed files with 4 additions and 4 deletions
|
|
@ -827,7 +827,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
if (!PInvoke.LookupPrivilegeValue(null, PInvoke.SE_INCREASE_QUOTA_NAME, out var luid))
|
||||
{
|
||||
errorInfo = $"LookupPrivilegeValue failed: {Marshal.GetLastWin32Error()}";
|
||||
hProcessToken.Dispose();//PInvoke.CloseHandle(hProcessToken);
|
||||
hProcessToken.Dispose();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
|
||||
PInvoke.AdjustTokenPrivileges(hProcessToken, false, &tp, 0, null, null);
|
||||
var lastError = Marshal.GetLastWin32Error();
|
||||
hProcessToken.Dispose();//PInvoke.CloseHandle(hProcessToken);
|
||||
hProcessToken.Dispose();
|
||||
|
||||
if (lastError != 0)
|
||||
{
|
||||
|
|
@ -915,10 +915,10 @@ retry:
|
|||
fixed (char* currentDirPtr = currentDir)
|
||||
{
|
||||
if (!PInvoke.CreateProcessWithToken(hPrimaryToken,
|
||||
0 /*CREATE_PROCESS_LOGON_FLAGS.LOGON_WITH_PROFILE*/,
|
||||
0,
|
||||
appPtr,
|
||||
cmdLinePtr,
|
||||
0/*PROCESS_CREATION_FLAGS.CREATE_NEW_CONSOLE*/,
|
||||
0,
|
||||
null,
|
||||
currentDirPtr,
|
||||
&si,
|
||||
|
|
|
|||
Loading…
Reference in a new issue