소스 검색

Really fix skipifsourcedoesntexist for archives.

Martijn Laan 3 달 전
부모
커밋
663f461a72
2개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 1
      ISHelp/isetup.xml
  2. 7 2
      Projects/Src/Setup.Install.pas

+ 0 - 1
ISHelp/isetup.xml

@@ -1818,7 +1818,6 @@ Instructs Setup to proceed to comparing time stamps (last write/modified time) i
 </flag>
 <flag name="skipifsourcedoesntexist">
 <p>This flag instructs the compiler -- or Setup, if the <tt>external</tt> flag is also used -- to silently skip over the entry if the source file does not exist, instead of displaying an error message.</p>
-<p>When combined with the <tt>extractarchive</tt> flag, this flag instructs Setup to skip if the extraction fails for any reason.</p>
 </flag>
 <flag name="solidbreak">
 <p>When <link topic="setup_solidcompression">solid compression</link> is enabled, this flag instructs the compiler to finalize the current compression stream and begin a new one before compressing the file(s) matched by <tt>Source</tt>. This allows Setup to seek to the file instantly without having to decompress any preceding files first. May be useful in a large, multi-component installation if you find too much time is being spent decompressing files belonging to components that weren't selected.</p>

+ 7 - 2
Projects/Src/Setup.Install.pas

@@ -1948,7 +1948,13 @@ var
     begin
       { See above }
 
-      Result := True; { We handle errors ourselves }
+      { If the archive doesn't exist then the caller should handle this with
+        a msgSourceDoesntExist message. All other errors we handle ourselves
+        with a msgErrorExtracting message, without informing the caller, unless
+        you count EAbort. }
+      Result := NewFileExistsRedir(DisableFsRedir, ArchiveFilename);
+      if not Result then
+        Exit;
 
       if foCustomDestName in CurFile^.Options then
         InternalError('Unexpected custom DestName');
@@ -1984,7 +1990,6 @@ var
             Failed := GetExceptMessage;
           end;
         until (Failed = '') or
-              (foSkipIfSourceDoesntExist in CurFile^.Options) or
               AbortRetryIgnoreTaskDialogMsgBox(
                 ArchiveFilename + SNewLine2 + SetupMessages[msgErrorExtracting] + SNewLine + Failed,
                 [SetupMessages[msgAbortRetryIgnoreRetry], SetupMessages[msgFileAbortRetryIgnoreSkipNotRecommended], SetupMessages[msgAbortRetryIgnoreCancel]]);