Kaynağa Gözat

Extractarchive log tweaks:
-Log a '-- Archive entry --' message during installation before the first '-- File entry--' belonging to that archive. Without it the log is confusing, especially if there's verification.
-Don't let 7-Zip handle not-yet-existing archives (like when an entry refers to an archive in {tmp}). Instead check ourselves like we already do during installation. Prevents confusing error message in the log.

Martijn Laan 3 ay önce
ebeveyn
işleme
8358e444e8

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

@@ -2033,6 +2033,8 @@ var
         InternalError('Unexpected custom DestName');
         InternalError('Unexpected custom DestName');
       const DestDir = ExpandConst(CurFile^.DestName);
       const DestDir = ExpandConst(CurFile^.DestName);
 
 
+      Log('-- Archive entry --');
+
       var VerifySourceF: TFile := nil;
       var VerifySourceF: TFile := nil;
       try
       try
         var FindData: TWin32FindData;
         var FindData: TWin32FindData;

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

@@ -1809,6 +1809,9 @@ function EnumFiles(const EnumFilesProc: TEnumFilesProc;
     { See above }
     { See above }
     Result := True;
     Result := True;
 
 
+    if not NewFileExistsRedir(DisableFsRedir, ArchiveFilename) then
+      Exit;
+
     if foCustomDestName in CurFile^.Options then
     if foCustomDestName in CurFile^.Options then
       InternalError('Unexpected CustomDestName flag');
       InternalError('Unexpected CustomDestName flag');
     const DestDir = ExpandConst(CurFile^.DestName);
     const DestDir = ExpandConst(CurFile^.DestName);
@@ -2829,6 +2832,9 @@ var
     { See above }
     { See above }
     Result := To64(0);
     Result := To64(0);
 
 
+    if not NewFileExistsRedir(DisableFsRedir, ArchiveFilename) then
+      Exit;
+
     var FindData: TWin32FindData;
     var FindData: TWin32FindData;
     var H := ArchiveFindFirstFileRedir(DisableFsRedir, ArchiveFilename,
     var H := ArchiveFindFirstFileRedir(DisableFsRedir, ArchiveFilename,
       AddBackslash(TempInstallDir), { DestDir isn't known yet, pass a placeholder }
       AddBackslash(TempInstallDir), { DestDir isn't known yet, pass a placeholder }