Pārlūkot izejas kodu

Fix RegisterResourcesWithRestartManager breaking Setup entirely on EnumFiles exception. Fixed by delaing it the same way as it already did with [Code] throwing exception.

Martijn Laan 3 mēneši atpakaļ
vecāks
revīzija
16a7b607e3
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      Projects/Src/Setup.MainFunc.pas

+ 6 - 1
Projects/Src/Setup.MainFunc.pas

@@ -2026,7 +2026,12 @@ begin
   try
     { Register our files. }
     RmRegisteredFilesCount := 0;
-    EnumFiles(RegisterFile, WizardComponents, WizardTasks, Pointer(True));
+    try
+      EnumFiles(RegisterFile, WizardComponents, WizardTasks, Pointer(True));
+    except
+      Log('EnumFiles(RegisterFiles) raised an exception.');
+      Application.HandleException(nil);
+    end;
     { Ask [Code] for more files. }
     if CodeRunner <> nil then begin
       AllowCodeRegisterExtraCloseApplicationsResource := True;