Browse Source

Fix old SetFileTime bug.

Martijn Laan 3 months ago
parent
commit
1252af988c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Projects/Src/Setup.Install.pas

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

@@ -1565,7 +1565,8 @@ var
             raise;
             raise;
           end;
           end;
           { Set time/date stamp }
           { Set time/date stamp }
-          SetFileTime(DestF.Handle, nil, nil, @CurFileDate);
+          if CurFileDateValid then
+            SetFileTime(DestF.Handle, nil, nil, @CurFileDate);
           { If it's the uninstall program, bind the messages }
           { If it's the uninstall program, bind the messages }
           if CurFile^.FileType = ftUninstExe then begin
           if CurFile^.FileType = ftUninstExe then begin
             AllowFileToBeDuplicated := False;
             AllowFileToBeDuplicated := False;