Browse Source

FIX: WfxPlugins - don't copy invalid time

Alexander Koblov 3 years ago
parent
commit
9c517fc282
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/filesources/wfxplugin/uwfxpluginutil.pas

+ 4 - 1
src/filesources/wfxplugin/uwfxpluginutil.pas

@@ -499,7 +499,10 @@ begin
   if caoCopyTime in FCopyAttributesOptions then
   begin
     if (FMode = wpohmCopyOut) then
-      mbFileSetTime(TargetFileName, DateTimeToFileTime(SourceFile.ModificationTime))
+    begin
+      if SourceFile.ModificationTimeProperty.IsValid then
+        mbFileSetTime(TargetFileName, DateTimeToFileTime(SourceFile.ModificationTime));
+    end
     else begin
       WfxFileTime := DateTimeToWfxFileTime(SourceFile.ModificationTime);
       FWfxPluginFileSource.WfxModule.WfxSetTime(TargetFileName, nil, nil, @WfxFileTime);