After testing E_Distance.SaveGroupedFaceEncodings
This commit is contained in:
@ -39,7 +39,7 @@ public class B_Metadata
|
||||
{
|
||||
Dictionary<string, List<KeyValuePair<string, string>>> results = new();
|
||||
if (_Log is null)
|
||||
throw new Exception($"{nameof(_Log)} is null!");
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
try
|
||||
{
|
||||
object? @object;
|
||||
@ -137,7 +137,9 @@ public class B_Metadata
|
||||
{
|
||||
dictionary = GetMetadataCollection(propertyHolder.ImageFileInfo.FullName);
|
||||
json = JsonSerializer.Serialize(dictionary, _WriteIndentedJsonSerializerOptions);
|
||||
if (Property.Models.Stateless.IPath.WriteAllText(fileInfo.FullName, json, compareBeforeWrite: true))
|
||||
bool updateDateWhenMatches = dateTimes.Any() && fileInfo.Exists && dateTimes.Max() > fileInfo.LastWriteTime;
|
||||
DateTime? dateTime = !updateDateWhenMatches ? null : dateTimes.Max();
|
||||
if (Property.Models.Stateless.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches, compareBeforeWrite: true, updateToWhenMatches: dateTime))
|
||||
{
|
||||
if (!_ForceMetadataLastWriteTimeToCreationTime && (!fileInfo.Exists || fileInfo.LastWriteTime == fileInfo.CreationTime))
|
||||
subFileTuples.Add(new Tuple<string, DateTime>(nameof(B_Metadata), DateTime.Now));
|
||||
|
Reference in New Issue
Block a user