Removed GenealogicalDataCommunication.WriteFile

This commit is contained in:
2023-07-21 03:48:06 -07:00
parent 33a142549a
commit 61f5fa20de
9 changed files with 111 additions and 178 deletions

View File

@ -251,11 +251,6 @@ internal abstract class MapLogic
personDisplayDirectoryNames = IPath.GetDirectoryNames(personNameDirectory);
if (!personDisplayDirectoryNames.Any())
continue;
if (newestPersonKeyFormatted is null)
{
if (!IPerson.IsDefaultName(configuration.MappingDefaultName, personDisplayDirectoryNames[^1]))
throw new NotImplementedException("Should this happen?");
}
files = Directory.GetFiles(personNameDirectory, "*", SearchOption.TopDirectoryOnly);
if (isReservedDirectoryName && files.Any())
throw new Exception($"Move personKey directories up one from {nameof(Shared.Models.Stateless.IMapLogic.Sorting)} and delete {nameof(Shared.Models.Stateless.IMapLogic.Sorting)} directory!");
@ -263,6 +258,11 @@ internal abstract class MapLogic
throw new Exception($"Move personKey directories up one from {manualCopyHumanized} and delete {manualCopyHumanized} directory!");
if (personKeyFormatted == forceSingleImageHumanized && files.Any())
throw new Exception($"Move personKey directories up one from {forceSingleImageHumanized} and delete {forceSingleImageHumanized} directory!");
if (newestPersonKeyFormatted is null)
{
if (!IPerson.IsDefaultName(configuration.MappingDefaultName, personDisplayDirectoryNames[^1]))
throw new NotImplementedException("Should this happen?");
}
if (personKeyFormatted.Length != configuration.PersonBirthdayFormat.Length)
continue;
if (personDisplayDirectoryNames[^1].Length == 1 || IPerson.IsDefaultName(configuration.MappingDefaultName, personDisplayDirectoryNames[^1]) || !personKeyFormattedCollection.Contains(personKeyFormatted))