Commit 91bc1857 authored by 罗显健's avatar 罗显健

文件打包有效期检验调整为:最后修改日期和创建时间双重判断。

parent 1f977c4d
...@@ -242,7 +242,8 @@ namespace Ftt.PatchPack ...@@ -242,7 +242,8 @@ namespace Ftt.PatchPack
// 打包排除的文件,跳过 // 打包排除的文件,跳过
if (ExceptFiles.Contains(fileInfo.Name)) continue; if (ExceptFiles.Contains(fileInfo.Name)) continue;
if (!IsValid(fileInfo.LastWriteTime, hours)) continue; // 最后修改日期 和创建日期(直接复制到新目录时最后修改日期没变,创建日期变了。)
if (!IsValid(fileInfo.LastWriteTime, hours) && !IsValid(fileInfo.CreationTime, hours)) continue;
string path = fileInfo.Directory.FullName.Replace(oldPath, newPath); string path = fileInfo.Directory.FullName.Replace(oldPath, newPath);
...@@ -256,7 +257,7 @@ namespace Ftt.PatchPack ...@@ -256,7 +257,7 @@ namespace Ftt.PatchPack
/// <summary> /// <summary>
/// 是否有效 /// 判断给定时间是否在有效期内。
/// </summary> /// </summary>
/// <param name="dateTime">比较时间</param> /// <param name="dateTime">比较时间</param>
/// <param name="hours">时间间隔,单位小时。-1 为永久有效</param> /// <param name="hours">时间间隔,单位小时。-1 为永久有效</param>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment