Forráskód Böngészése

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 hónapja
szülő
commit
16a7b607e3
1 módosított fájl, 6 hozzáadás és 1 törlés
  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;