Start of ;9
This commit is contained in:
@ -108,7 +108,9 @@ internal abstract partial class XDirectory
|
||||
if (possibleFileInfo.LastWriteTime == fileInfo.LastWriteTime && possibleFileInfo.Length == fileInfo.Length)
|
||||
continue;
|
||||
timeSpan = new(possibleFileInfo.LastWriteTime.Ticks - fileInfo.LastWriteTime.Ticks);
|
||||
if (timeSpan.TotalMinutes < 2 && possibleFileInfo.Length == fileInfo.Length)
|
||||
if (possibleFileInfo.Length != fileInfo.Length)
|
||||
throw new Exception(Path.GetFileNameWithoutExtension(file));
|
||||
if (timeSpan.TotalMinutes < 61)
|
||||
{
|
||||
File.SetLastWriteTime(file, new DateTime[] { possibleFileInfo.LastWriteTime, fileInfo.LastWriteTime }.Min());
|
||||
continue;
|
||||
@ -134,7 +136,7 @@ internal abstract partial class XDirectory
|
||||
continue;
|
||||
matches.Add(possible);
|
||||
}
|
||||
if (matches.Count == 1 || (lengths.Distinct().Count() == 1 && creationTimes.Distinct().Count() == 1))
|
||||
if (matches.Count == 1 || (matches.Any() && lengths.Distinct().Count() == 1 && creationTimes.Distinct().Count() == 1))
|
||||
result = matches.First();
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user