Răsfoiți Sursa

With /rawconfig, session is never opened in an existing instance

This "fixes" bug that causes opening session in an existing instance with /rawconfig preceding session url to fail, e.g.:
/rawconfig Interface\interface=1 /ini=nul [email protected]

Source commit: a2650dadde75a84ac165f87e4c9a0ca7d7515932
Martin Prikryl 1 an în urmă
părinte
comite
b30dc66c22
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      source/windows/WinMain.cpp

+ 6 - 1
source/windows/WinMain.cpp

@@ -1203,7 +1203,12 @@ int __fastcall Execute()
         bool TrySendToAnotherInstance =
           (ParamCommand == pcNone) &&
           (WinConfiguration->ExternalSessionInExistingInstance != OpenInNewWindow()) &&
-          !NewInstance;
+          !NewInstance &&
+          // With /rawconfig before session url, parsing commandline does not work correctly,
+          // when opening session in the other instance.
+          // And as it is not clear what it should do anyway, let's ban it and
+          // never send to the existing instance, whenever /rawconfig is used.
+          !Params->FindSwitch(RAW_CONFIG_SWITCH);
 
         if (TrySendToAnotherInstance &&
             !AutoStartSession.IsEmpty() &&