Ver Fonte

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 há 3 meses atrás
pai
commit
16a7b607e3
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      Projects/Src/Setup.MainFunc.pas

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

@@ -2026,7 +2026,12 @@ begin
   try
   try
     { Register our files. }
     { Register our files. }
     RmRegisteredFilesCount := 0;
     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. }
     { Ask [Code] for more files. }
     if CodeRunner <> nil then begin
     if CodeRunner <> nil then begin
       AllowCodeRegisterExtraCloseApplicationsResource := True;
       AllowCodeRegisterExtraCloseApplicationsResource := True;